delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/08/09:10:52

Message-Id: <m0udG0t-001kAaC@desertoak.awa.com.au>
Date: Mon, 8 Jul 96 23:06:07 +1000 (AEST)
From: Chris Johns <cjohns AT desertoak DOT awa DOT com DOT au>
To: djgpp AT delorie DOT com
In-reply-to: <199607080518.AA014673133@relay1.geis.com> (j.aldrich6@genie.com)
Subject: Re: Executable size

   >What can be done about the large size of the executables
   >produced by gcc?  A "hello world" program is bloated at
   >57kb. I used the -O switchs, but that produced no change.
   >What can be done about this?

   As has been said many, many, many times before, a hello world is
   not a realistic test case to determine the size of a compiler's output.
   DJGPP programs have about 40-50K or so of overhead which includes
   invoking DPMI, parsing the command line, loading environment
   variables, and passing the argc and argv parameters to main().
   The actual size of _your_ code is substantially smaller than most
   other 32-bit compilers, especially with optimizations.  If you want
   to cut out some of this overhead, you can define empty versions of
   the functions __crt0_glob_function(), __crt0_load_environment_file(), and
   __crt0_setup_arguments().  Of course, this removes the corresponding
   functionality from your program.  Look up those functions in the libc
   docs for more info.

Could the glob code be a loadable module ? A 'dxe' ?

If it has libc code then it is no good as I think someone said libc
cannot be in a 'dxe'. I do not have the source code here to
check. Sorry.

Chris

- Raw text -


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