Mail Archives: djgpp/1997/11/25/10:14:25

Date: Tue, 25 Nov 1997 17:12:56 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Chris Croughton <crough45 AT amc DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: Excessive exe sizes
In-Reply-To: <>
Message-ID: <Pine.SUN.3.91.971125170856.28212I-100000@is>
MIME-Version: 1.0

On Tue, 25 Nov 1997, Chris Croughton wrote:

> However, if it is not actually initialised, for instance:
>   int array[10000];
> then there should be no need to put it in the executable.

That's exactly what happens--in C programs.  In C++, there's a potential
problem with such declarations (see section 8.14 of the FAQ) which GCC
resolves by including the array in the executable (there's a switch to
disable this behavior). 

> Can this be done now?  Certainly as far as the DOS executable
> format is concerned.

DJGPP's COFF format has a .bss section.  The array in your example would 
be stored there.

- Raw text -

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