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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6575b47ba54cee7c,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!s12g2000prg.googlegroups.com!not-for-mail From: Hibou57 Newsgroups: comp.lang.ada Subject: Reducing the size of executables produced by GNAT Date: Wed, 13 Feb 2008 03:52:49 -0800 (PST) Organization: http://groups.google.com Message-ID: <40e9c01a-8d31-4554-9d9b-18cce7834d56@s12g2000prg.googlegroups.com> NNTP-Posting-Host: 86.66.190.63 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1202903569 21680 127.0.0.1 (13 Feb 2008 11:52:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 13 Feb 2008 11:52:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s12g2000prg.googlegroups.com; posting-host=86.66.190.63; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.23 (Windows NT 5.1; U; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19768 Date: 2008-02-13T03:52:49-08:00 List-Id: Hallo, My first question here. 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'm afraid of what it means : take long to initialize at startup ? (I need fast application, for CGI on a Linux server), many unusefull dependencies on external library ? etc, etc Further more, as usualy, dynamic linking on Linux fall into many troubles, and to make it work properly, I need to compile it statically linked. And there, I got a simple Hello-World which weight 120KB! Why is it so big ? What can I do ? Are there some hidden magic compiler switch to reduce this size ? What are the conscenquences of this size ? Does it execute all of this 120KB of code before starting the application main work ? I have a look at the GNAT manual, then used gnatelim as suggested, but this is not better (same size). I have a look at all gnatmake, gnatbind and gnatlink options, but something good. I have a look at an exemple at wikibook wihicj pretend to reduce the size of an hello work downto 10K (which is still big, but really better), but while they pretend to be able to do this.... they do not indicates a sole advice to do it (strange...). I've tryed to compile with "pragma No_Run_Time", but then compilation fails as soon as there is a sole exception statement in the code (I need exceptions). I've tryed "pragma Restricted_Run_Time" and "pragma Profile (Restricted)", but this not better (always the same size). So GNAT = big-big binaries : is it a rule ? Many thanks for any concret advice, for any indications of any useful compiler switch. N.B. I do not need multitasking, I just need exception support, file I/ O, while in the mean time, if really necessary, I could create my own package for IO.