IA64 symbol addresses always 0?
Sat Jan 3 12:19:00 GMT 2004
On Mon, Dec 22, 2003 at 05:26:20PM +1100, Ian Wienand wrote:
> 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
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.
IBM OzLabs - Linux Technology Centre
More information about the Binutils