EXE file size

Doug Gwyn gwyn at smoke.brl.mil
Tue Nov 13 00:29:02 AEST 1990


In article <4302 at sactoh0.SAC.CA.US> jak at sactoh0.SAC.CA.US (Jay A. Konigsberg) writes:
>I have wondered the same thing. Mainly, why are C exectuables so large.
>foo.c       11
>foo.o      256 
>foo       4815

The executable contains a run-time startoff module (crt0.o), plus some
library functions needed by crt0.o, such as exit().  Clever C library
implementations are able to arrange that the stdio overhead normally
needed to support exit() is not linked in when stdio functions are not
invoked directly by the application; otherwise, there would also be
all the static _iob structs and the code for fclose(), fflush(), etc.
crt0.o also is responsible for collecting environment variables and
program arguments so that they can be passed to main() etc.



More information about the Comp.lang.c mailing list