www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/31/06:45:25

Date: Wed, 31 Oct 2001 13:43:18 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
Subject: Re: Patch for develop.txi: BSS and restarted programs
In-Reply-To: <200110302002.f9UK2w421501@envy.delorie.com>
Message-ID: <Pine.SUN.3.91.1011031134253.7776F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 30 Oct 2001, DJ Delorie wrote:

> > The _real_ problem is not with the startup code.  The variables in the
> > BSS section are AFAIK initialized by the linker, not by the startup
> > code.
> 
> No, the stub zeros out bss at run-time.

Oops, sorry for disinformation.

> If you're running an unexec'd
> image, the unexec should change the .bss memory range to .data so that
> it acts like initialized data.

That's what Emacs unexec does: it adds everything that was in .bss to
.data.  Otherwise, dumping would not work, since dumping effectively
initializes some of the variables that were uninitialized in the
original executable.  That is how unexec records changes made before
dumping in the dumped executable.

- Raw text -


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