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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,380eb3e330e4b3e1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-07 01:44:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!oleane.net!oleane!freenix!enst!enst.fr!not-for-mail From: Duncan Sands Newsgroups: comp.lang.ada Subject: Re: Executable size with GNAT for Windows and Linux Date: Tue, 7 May 2002 10:43:50 +0200 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <3CD791D2.7060903@dornier.eads.net> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: avanie.enst.fr 1020761042 58474 137.194.161.2 (7 May 2002 08:44:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 7 May 2002 08:44:02 +0000 (UTC) Return-Path: X-Mailer: KMail [version 1.3.2] In-Reply-To: <3CD791D2.7060903@dornier.eads.net> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:23619 Date: 2002-05-07T10:43:50+02:00 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.