This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linker Bug or Design Intent (Absolute symbols in zero sized sections)


On Tue, Sep 26, 2006 at 12:45:20PM -0400, Daniel Jacobowitz wrote:
> On Tue, Sep 26, 2006 at 09:30:24AM -0700, H. J. Lu wrote:
> > Convert section relative symbol to absolute shouldn't be a problem
> > in most cases. If we know it may be a problem at link time, we can
> > keep it section relative.
> 
> You keep saying this, but on various platforms it isn't true.  Section
> relative symbols move with an object if it is relocated in any way.
> Absolute symbols don't.

This isn't true for the common ELF targets.  An absolute symbol in a
shared library is effectively relative to the base of the shared lib.
A sad consequence of defining syms like _GLOBAL_OFFSET_TABLE_ and
_DYNAMIC as absolute.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]