Problems with new binutils, -mbss-plt and prelink

Jakub Jelinek jakub@redhat.com
Fri Jul 29 12:40:00 GMT 2005


Hi!

In the past, _GLOBAL_OFFSET_TABLE_ used to always be at .got+4, so unless
DT_PPC_GOT exists (== -msecure-plt shared library or binary), prelink relies
on that (using _GLOBAL_OFFSET_TABLE_ is not possible, as it is hidden
and therefore not present in stripped DSOs/binaries) - no dynamic tag
contains that value either.
But current binutils put it at the end of .got instead (the 4 word block,
containing 0x4e800021 (blrl insn), address of _DYNAMIC without relocation
and 2 zeros.  Can I at least rely on it being either at the beginning or
at the end of .got section (and check whether the 2 initial values are ok
and no relocations are against those 4 values)?

The reason why prelink needs to know is that it must adjust the _DYNAMIC
address.

	Jakub



More information about the Binutils mailing list