www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/23/02:25:38

Date: Thu, 23 Jan 1997 08:41:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Ruiter de M <mdruiter AT cs DOT vu DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: throw,catch,try problem
In-Reply-To: <5c4tia$8ea@star.cs.vu.nl>
Message-ID: <Pine.SUN.3.91.970123083739.3044F-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019