From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6575b47ba54cee7c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Reducing the size of executables produced by GNAT References: <40e9c01a-8d31-4554-9d9b-18cce7834d56@s12g2000prg.googlegroups.com> In-Reply-To: <40e9c01a-8d31-4554-9d9b-18cce7834d56@s12g2000prg.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1202938341 12.201.97.213 (Wed, 13 Feb 2008 21:32:21 GMT) NNTP-Posting-Date: Wed, 13 Feb 2008 21:32:21 GMT Organization: AT&T ASP.att.net Date: Wed, 13 Feb 2008 21:32:21 GMT Xref: g2news1.google.com comp.lang.ada:19782 Date: 2008-02-13T21:32:21+00:00 List-Id: Hibou57 wrote: > > For a long time ago I'm looking for a way to reduce th esize of Ada > programs compiled with GNAT. > > With a simple Hello-World I cannot go below 45KB, which is very much > for a so simple program. I presume you're using Ada.Text_IO, which is a very large, complex package that does lots of things few people ever use, such as counting columns, lines, and pages. This is the main reason naive Ada hello-world programs are bigger than those from languages with simpler I/O libraries. Since you're using GNAT, one simple option is to use GNAT.IO rather than Ada.Text_IO. That should cause a noticeable reduction in executable size. You can also import the C fputs function and reduce the size even further. -- Jeff Carter "People called Romanes, they go the house?" Monty Python's Life of Brian 79