Mail Archives: djgpp/1997/05/28/22:06:48
> "If your program doesn't need parts of the startup code, it can be made
> smaller by defining certain functions with empty bodies. These
^^^^^^^^^^
> functions are `__crt0_glob_function', `__crt0_load_environment_file',
> and `__crt0_setup_arguments.'..."
>
> I am not sure what is meant by empty bodies, supposedly:
>
> #define __crt0_glob_function
The key part here is functions. These functions are defined in
the libc sources and included in either crt0.o or libc.a (not sure).
The linker will bring in dj's full versions of these functions
(which do wildcard expansion and such) if they do not find any other
present. You need to define them yourself like
__crt0_glob_function() {}
Check the prototypes needed here, I'm just guessing.
> Even if this is true, judging from the
> size hello.c file in comparison to the size of its executable, the
> compiler still generates an enormous output. I wonder what steps to
> take
Judging by the size of the final executable takes into accound anything
pulled in from libgcc and libc (as well as others potentially), as
well as the real mode stub. If you want to look at the size of a particular
piece of code compile with -c and look at the size of the .o file
produced.
Take into account that DJGPP has a lot of overhead, but this
becomes less significant as your code size grows.
There is also an exe compressor that works fairly well (so ive heard)
Andrew
- Raw text -