Date: Mon, 8 Jul 1996 08:32:41 +0200 (IST) From: Eli Zaretskii To: Matthew Miller Cc: djgpp AT delorie DOT com Subject: Re: Executable size In-Reply-To: <4rpd3d$l3u@solaris.cc.vt.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 7 Jul 1996, Matthew Miller wrote: > 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? Is your problem indeed with the "hello world" program, or do you have a real-world program whose size seems to be larger than you expect? Trivial programs can be made as small as 18KB, but some of the tricks to achieve this are inapplicable to real programs. For most real-world programs, the executable produced by DJGPP is usually smaller than you get with other compilers, but some specific features in the program can sometimes bloat the executable. There are methods that can be used with such programs to shrink their size, but you will have to tell more about your program to get meaningful replies, because each method is tied to specific reason for large executable image. There is also a DJGPP-specific executable compressor which can be used if you really need to make them small. Take a look at it at ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/mlefp103.zip.