Date: Wed, 8 Jan 1997 09:41:02 +0200 (IST) From: Eli Zaretskii To: shearer AT pluto DOT njcc DOT com cc: djgpp AT delorie DOT com Subject: Re: How can I reduce the compiled executable size? In-Reply-To: <32D2F60F.248A@pluto.njcc.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 7 Jan 1997 shearer AT pluto DOT njcc DOT com wrote: > > > Now, it I compare the file sizes of with.exe and without.exe, > > 1-04-97 22:46 100,205 with.exe > > 1-04-97 22:47 61,446 without.exe > > forget about the cornio's addition of approx. 40k... > ...what makes an executable (which does nothing!),,, > ...over 61k??? This is explained in section 8.15 of the DJGPP FAQ list (v2/faq202b.zip from the same place you get DJGPP), which also tells how to make the bloat smaller when you need that. > C is supposed to be the next best thing to ASM!!!... > but this is laughable... Then laugh. If DJGPP brings more laughter to the world, I think it's made its day well. Seriously, DJGPP is not meant to write trivial hello world programs. It doesn't make sense to switch the CPU to protected mode just to print a string, or loop a few times. The overhead of the startup code is additive, so the larger the program, the less you feel it. Besides, when you read the above section of the FAQ, you will see that most of those 60K are the debugging symbols (which aren't stripped by default, but you can do it if you add -s to the gcc switches).