What is R_X86_64_GOTPLT64 used for?

H.J. Lu hjl.tools@gmail.com
Wed Nov 19 23:54:00 GMT 2014

On Wed, Nov 19, 2014 at 8:38 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> One way to optimize it is to make PLT entry to use the normal GOT
> slot:
> jmp  *name@GOTPCREL(%rip)
> 8 byte nop
> where name@GOTPCREL points to the normal GOT slot
> updated by R_X86_64_GLOB_DAT relocation at run-time.
> Should I give it a try?

I turned out that we can reuse BND PLT.  I implemented it in BFD ld
on hjl/plt.got branch:


I tested it on glibc and it works.  It should work with all models.  Please
give it a try.


More information about the Binutils mailing list