Message-Id: Date: Mon, 8 Jul 96 23:06:07 +1000 (AEST) From: Chris Johns 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