Mail Archives: djgpp-workers/2001/10/31/06:45:25
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 -