comp.lang.ada
 help / color / mirror / Atom feed
From: Duncan Sands <duncan.sands@math.u-psud.fr>
Subject: Re: Executable size with GNAT for Windows and Linux
Date: Tue, 7 May 2002 10:43:50 +0200
Date: 2002-05-07T10:43:50+02:00	[thread overview]
Message-ID: <mailman.1020761041.9634.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <3CD791D2.7060903@dornier.eads.net>

On Tuesday 07 May 2002 10:35 am, Joachim Schr�er wrote:
> Duncan Sands wrote:
> > On Monday 06 May 2002 12:06 pm, Preben Randhol wrote:
> >>On 05 May 2002 21:58:42 +0200, Michael Bode wrote:
> >>>I've found the size of executables to differ considerably under
> >>>Windows and Linux.  The hello.adb that comes with gnat 3.13p has under
> >>>Linux this size:
> >>>
> >>>gnatmake -g hello.adb
> >>
> >>did you compile with -g ? That would include debugging information.
> >>Compile without -g.
> >
> > The linker option -s strips out debugging info and some other symbols.
> >
> > Duncan.
>
> That switch is not documented in the GNAT User's Guide I have
> (GNAT Version 3.14p, Date: 2001/05/10 16:08:26).
> When I use it one of my Exes shrinks from 15 Mb to 3.5 Mb.
> But the switch eliminates the binder switch -E which generates
> a readable stacktrace when using
> Gnat.Traceback_Symbolic.Symbolic_Traceback.
> When using -bargs -E -largs -s the generated stacktrace only
> contains addresses, no filenames and linenumbers.

It is in the gcc documentation (along with plenty of other usefull switches).
I once suggested to Robert Dewar (if I remember right) that -s be included
in the section on reducing the size of executables in the GNAT user guide.
Check out the program "strip" as well.  By the way, the large reduction in
size you see is almost certainly due to the removal of debugging information.
So the simplest thing to do is to compile without -g.

All the best,

Duncan.



  reply	other threads:[~2002-05-07  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-05 19:58 Executable size with GNAT for Windows and Linux Michael Bode
2002-05-06  0:44 ` Robert Dewar
2002-05-06 19:00   ` Michael Bode
2002-05-06 10:06 ` Preben Randhol
2002-05-06 10:14   ` Duncan Sands
2002-05-07  8:35     ` Joachim Schröer
2002-05-07  8:43       ` Duncan Sands [this message]
2002-05-06 19:02   ` Michael Bode
2002-05-06 11:41 ` David Botton
replies disabled

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