What is R_X86_64_GOTPLT64 used for?
H.J. Lu
hjl.tools@gmail.com
Thu Nov 13 14:56:00 GMT 2014
x86-64 psABI has
name@GOT: specifies the offset to the GOT entry for the symbol name
from the base of the GOT.
name@GOTPLT: specifies the offset to the GOT entry for the symbol name
from the base of the GOT, implying that there is a corresponding PLT entry.
But GCC never generates name@GOTPLT and assembler fails to assemble
it:
[hjl@gnu-6 pr17598]$ cat x.S
movabs $foo@GOTPLT,%rax
[hjl@gnu-6 pr17598]$ gcc -c x.S
x.S: Assembler messages:
x.S:1: Error: relocated field and relocation type differ in signedness
[hjl@gnu-6 pr17598]$
It certainly isn't needed on data symbols. I couldn't find any possible
usage for this relocation on function symbols.
Does anyone remember what it was supposed to be used for?
--
H.J.
More information about the Binutils
mailing list