What is R_X86_64_GOTPLT64 used for?
H.J. Lu
hjl.tools@gmail.com
Thu Nov 20 11:43:00 GMT 2014
On Wed, Nov 19, 2014 at 3:54 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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:
>
> https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/hjl/plt.got
>
> I tested it on glibc and it works. It should work with all models. Please
> give it a try.
I spoke too soon. I found a problem and I will investigate it.
--
H.J.
More information about the Gcc
mailing list