From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Reducing the size of executables produced by GNAT
Date: Thu, 14 Feb 2008 07:58:55 +0100
Date: 2008-02-14T07:58:55+01:00 [thread overview]
Message-ID: <ygeprv058i8.fsf@hugsarin.dmusyd.edu> (raw)
In-Reply-To: 40e9c01a-8d31-4554-9d9b-18cce7834d56@s12g2000prg.googlegroups.com
Hibou57 <yannick_duchene@yahoo.fr> writes:
> For a long time ago I'm looking for a way to reduce th esize of Ada
> programs compiled with GNAT.
Are you sure it is an important goal for your task?
> With a simple Hello-World I cannot go below 45KB, which is very much
> for a so simple program.
I just created a 7_796 byte "Hello World" program. Without any
special tricks.
I suspect that you are not really aware of what the Ada.Text_IO
library is supposed to do behind the scenes. There is a fair bit of
accounting going on.
> I'm afraid of what it means : take long to initialize at startup ?
Have you tested if that is really the case?
> (I need fast application, for CGI on a Linux server),
If you really need a fast solution, why don't you create a stand-alone
HTTP server instead?
> Further more, as usualy, dynamic linking on Linux fall into many
> troubles,
The only one I've ever had, is that I have to recompile when I switch
to the next stable version of Debian.
> I need to compile it statically linked. And there, I got a simple
> Hello-World which weight 120KB!
I only get 110_236 bytes.
> Why is it so big ?
Because you link in the run-time.
> What can I do ? Are there some hidden magic compiler switch to
> reduce this size ?
None that I know of.
> What are the conscenquences of this size ? Does it execute all of
> this 120KB of code before starting the application main work ?
Most likely not.
Greetings,
Jacob
--
�A corollary of Murphy's law is that duplicate information
eventually becomes different information. Putting both in
the same file may slow down the process, but it will not
prevent it.� -- Wes Groleau
prev parent reply other threads:[~2008-02-14 6:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
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-19 0:41 ` Hibou57
2008-02-15 5:52 ` Randy Brukardt
2008-02-15 5:52 ` Randy Brukardt
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 message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox