delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/08/01:37:27

Date: Mon, 8 Jul 1996 08:32:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Matthew Miller <namille2 AT vt DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: Executable size
In-Reply-To: <4rpd3d$l3u@solaris.cc.vt.edu>
Message-Id: <Pine.SUN.3.91.960708082149.28866D-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019