[PATCH][x86_64] Convert indirect call via GOT to direct when possible

H.J. Lu hjl.tools@gmail.com
Fri Jun 10 23:18:00 GMT 2016


On Fri, Jun 10, 2016 at 3:22 PM, Cary Coutant <ccoutant@gmail.com> wrote:
>>> 2. HJ, given an R_X86_64_GOTPCRELX relocation, is it still necessary
>>> to check the opcode during Scan::global()? Doesn't the relocation
>>> guarantee that it's an appropriate instruction for the transformation?
>>> I think in both cases, we could skip fetching the section contents if
>>> we have this relocation.
>>
>> Doesn't gold make different decision based on opcode, like
>> branch vs non-branch?
>
> Only during actual relocation, when we necessarily have the section
> contents already available. During relocation scanning, it would be
> nice to avoid reading the section contents.
>
> -cary

Yes, no need to check opcode for GOTPCRELX during scan.

-- 
H.J.



More information about the Binutils mailing list