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

Alan Modra amodra@bigpond.net.au
Tue Sep 26 23:50:00 GMT 2006


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



More information about the Binutils mailing list