Date: Thu, 23 Jan 1997 08:41:38 +0200 (IST) From: Eli Zaretskii To: Ruiter de M cc: djgpp AT delorie DOT com Subject: Re: throw,catch,try problem In-Reply-To: <5c4tia$8ea@star.cs.vu.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 22 Jan 1997, Ruiter de M wrote: > : PS: Looking at the file sizes of the DOS- and Linux executables of > : the above program made me a bit uneasy. I stripped both files, > : but while the Linux file shrinked to a handsome 5KB file, the > : DOS executable still needs about 100KB ! > : Is there a reasonable explanation for this? > > DOS requires almost the whole iostream-library to be linked in. Linux > can use dynamic linked libraries I think, plus the DJGPP-startup code > needs to handle things like loading the DPMI-provider, parsing DJGPP.ENV, > set up argc/argv, etc... Try compiling a REAL program. The difference in > size will turn out te be constant. Most (all?) of this is in the FAQ. There is no way to fairly compare the size of an executable in an environment which supports shared libraries (such as Linux) with one that doesn't (such as DJGPP). With shared libraries, about the only thing that's in the executable is the startup code and the names of the library functions it calls (provided that the main function doesn't do anything). Btw, the startup code of DJGPP isn't much larger than 5KB.