Date: Thu, 4 Jul 1996 10:43:55 +0200 (IST) From: Eli Zaretskii To: deuce Cc: djgpp AT delorie DOT com Subject: Re: EXE size In-Reply-To: <4re14h$k40@panix2.panix.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 3 Jul 1996, deuce wrote: > hello world compiles to about 50K .exe. I wonder why so much...there is > only a printf function. Is there any way to get it smaller? 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.' By defining empty substitutes for all three of these, you can make the "Hello" program be about 18KB on disk. You can make your program image still smaller by compressing it with `DJP' which is a DJGPP-specific executable compressor, available as ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/mlefp103.zip. It is fast and has no memory overhead.