Mail Archives: djgpp/1996/07/08/09:10:52
>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 -