comp.lang.ada
 help / color / mirror / Atom feed
* Reducing the size of executables produced by GNAT
@ 2008-02-13 11:52 Hibou57
  2008-02-13 14:38 ` Martin Krischik
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Hibou57 @ 2008-02-13 11:52 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2008-02-19  0:41 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-13 11:52 Reducing the size of executables produced by GNAT Hibou57
2008-02-13 14:38 ` Martin Krischik
2008-02-13 20:03   ` Hibou57
2008-02-13 20:25     ` Pascal Obry
2008-02-13 21:41       ` Maciej Sobczak
2008-02-13 23:35         ` Ludovic Brenta
2008-02-13 20:37     ` tmoran
2008-02-14 10:12       ` Georg Bauhaus
2008-02-14 11:07         ` Ludovic Brenta
2008-02-14 22:07           ` Hibou57
2008-02-15  0:19             ` Robert A Duff
2008-02-13 21:27     ` Gautier
2008-02-13 22:14       ` Hibou57
2008-02-14 10:34         ` Georg Bauhaus
2008-02-14 10:53         ` anon
2008-02-15  5:52         ` Randy Brukardt
2008-02-15  5:52         ` Randy Brukardt
2008-02-15  5:52         ` Randy Brukardt
2008-02-19  0:41           ` Hibou57
2008-02-13 14:50 ` gautier_niouzes
2008-02-13 15:41   ` Pascal Obry
2008-02-13 15:52 ` Ludovic Brenta
2008-02-13 16:19 ` anon
2008-02-13 16:28   ` Pascal Obry
2008-02-13 17:34 ` Tero Koskinen
2008-02-13 21:32 ` Jeffrey R. Carter
2008-02-14  6:58 ` Jacob Sparre Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox