bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arm-aout-ld .data header bug


From: Nick Clifton
Subject: Re: arm-aout-ld .data header bug
Date: 11 Oct 2001 18:27:24 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hi Aleksey,

> When linker calculates the length of .data section for the aout header
> it rounds it up to the nearest page.
> 
> At the same time it puts .bss right after .data end without any
> additional alignment in the image.
> 
> So, information in the header contains and incorrect value for the
> length of data section and hence the location of .bss .
> 
> It is a minor but annoying bug, because some loaders do depend upon
> header information to locate and zero .bss.
> 
> I do not know how to fix header generation, so I fixed link script
> to match current header generation practice, it is appended to
> this mail. I do not think that this is the right way to address
> this problem, however, I do not know a better way to solve it.

Well there is a comment in bfd/aoutx.h:adjust_z_magic() saying:

  /* Spec says data section should be rounded up to page boundary.  */

Just before it aligns the size of the data section, so my guess would
be that this is deliberate, and that therefore your change is correct.

I have applied your patch to the sources.  My apologies for taking so
long to getting round to look at this problem.

Cheers
        Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]