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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e9f27bbe0678fdfc X-Google-Attributes: gid103376,public From: Gautier Subject: Re: huge executable?? Date: 2000/05/14 Message-ID: <391F21AD.1A4DDAB2@maths.unine.ch>#1/1 X-Deja-AN: 623380863 Content-Transfer-Encoding: 7bit References: <391E09C3.FA04871E@mailandnews.com> <391F102C.26ED7310@maths.unine.ch> <391F0851.C23985A@mailandnews.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 14 May 2000 23:59:10 +0100, mac13-32.unine.ch Organization: Maths - Uni =?iso-8859-1?Q?Neuch=E2tel?= MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-05-14T00:00:00+00:00 List-Id: David Dousette wrote: > > I used Pacific C for DOS... seems like I did one a while back in Watcom 11, > too, and it wasn't much bigger or smaller. I didn't think to try it with > GCC... but what is it about GCC and GNAT that causes that much of an > increase? Just the static linking? 32-bit, Unix-like environment, a rich run-time library; all that combined with a linker that doesn't trim unused code. It means that even if you are using 1-2 procedures in some package, it will put the whole package, and of course if one of the unused procedures refers to another package unused by others, it will link also that one and so on... But be reassured: the .exe won't grow so much as your program. The size you see is the "b" in the "size(x)=ax+b" function where x is you source code - I'm simplifying of course... If you absolutely want a small exe, pass it through UPX: http://wildsau.idv.uni-linz.ac.at/mfx/upx.html The Janus compiler seems to reduce code size at best; they have a smart linker too: http://www.rrsoftware.com/ And GNAT can compensate the lack of smart linker with the "gnatelim" tool that does removal at compilation stage (doesn't it ?). But it can mean recompiling everything for different projects since the .o files would be incomplete. _____________________________________________ Gautier -- http://members.xoom.com/gdemont/