This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
On Tue, Sep 26, 2006 at 06:54:14AM -0700, H. J. Lu wrote:
> On Tue, Sep 26, 2006 at 08:11:57PM +0930, Alan Modra wrote:
> > I think it is quite reasonable to remove empty output sections, even
> > those used to define symbols via the linker script (the symbols
> > become absolute). The case for ignoring linker script VMA and LMA
> > assignments isn't so strong, particularly since doing so can affect
> > following sections. I think it would be safest if we went back to
> > always obeying them, even for ALIGN expressions. Alternatively, we
> > could completely ignore the VMA and LMA assignments on empty output
> > sections. I agree that the current situation, where we take note of
> > the VMA only within the section, is silly.
>
> Obey ALIGN expressions on empty output sections will break x86-64. I
> noticed that when I was building glibc on x86-64.
How does it break, and why? If you were using an older linker that
didn't remove empty output sections, then of course the linker would
obey the ALIGN expression in a section VMA.
--
Alan Modra
IBM OzLabs - Linux Technology Centre