delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/25/06:50:13

Date: Tue, 25 Nov 1997 13:49:05 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Hilaire Fernandes <hilaire DOT fernandes AT iname DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Compiled programs are HUGE!
In-Reply-To: <34799CD1.62561326@iname.com>
Message-ID: <Pine.SUN.3.91.971125134847.27505G-100000@is>
MIME-Version: 1.0

On Mon, 24 Nov 1997, Hilaire Fernandes wrote:

> > But 200k is outragous! What is going on?
> > ems with DJGPP.
> 
> The problem is just that DJGPP has to do some jobs in place of 16 bits
> DOS  :(
> In other platform as Risc PC, a hello.c file just take ~500 bytes once
> compiled with GCC :)

Sorry, this might be misleading.  First, in most cases the large
executable is caused by the fact that people don't strip the debugging
symbols (-s switch to gcc).  This makes the .exe roughly 2-3 times
larger (i.e., in the case above, I'd guess that stripping it will
leave about 80K .exe).

And second, the 500-byte executable on a Risc PC is probably produced
with shared libraries, which means that the library is not linked into
the program.  DJGPP doesn't support this (it's hard and IMHO doesn't
make much sense on DOS), and comparing statically and dynamically
linked programs is meaningless.

The DJGPP code indeed has to work around some deficiences in MS-DOS,
but that code is relatively small and usually not linked into trivial
programs.  It certainly can NOT explain 200KB-long executable.

- Raw text -


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