IA64 symbol addresses always 0?

Daniel Jacobowitz drow@mvista.com
Tue Jan 6 14:36:00 GMT 2004


On Sat, Jan 03, 2004 at 10:49:02PM +1030, Alan Modra wrote:
> On Mon, Dec 22, 2003 at 05:26:20PM +1100, Ian Wienand wrote:
> [snip]
> > Shouldn't the symbol value be the PLT entry for the relocation?
> > 
> > This meshes with what I understand of 386 behaviour, where an
> > R_I386_JUMP_SLOT gives it's value as the PLT entry if I haven't
> > misunderstood:
> 
> x86 is really the odd one out, as undefined symbols are normally zero.
> 
> x86 gives undefined function symbols a value in the plt so that you can
> load the "address" of the function in an app without needing text
> relocations.  The dynamic linker co-operates with another hack that
> ensures a shared lib defining the function also gets the same address.
> This is needed to make function pointer comparisons work between an app
> and a shared lib.  ia64 uses a different scheme for function pointers
> that doesn't need this hack.
> 
> Note that CVS x86 ld *doesn't* set all undefined function symbols to
> their plt entries, only those that have their address taken in the app.

Don't most non-descriptor architectures do this?  ARM does, and MIPS
does (sometimes and sometimes not; I don't remember exactly why but I
think it's the same if-address-taken).  SH does.  Even PPC does.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list