This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On Tue, Jun 28, 2016 at 12:31 PM, Cary Coutant <> wrote:
>> Yes, good point.  I am a little confused about this new relocation
>> elfcpp::R_X86_64_GOTPCRELX.  I have attached a patch that reverts to
>> the change you suggested where I check for conversion always.
>> However,  is it safe to assume that a elfcpp::R_X86_64_GOTPCRELX
>> relocation implies that the instruction containing the relocation is
>> eligible for one of the conversions *always* ?
> Here's HJ's original proposal:
> It looks like that relocation marks several different instructions
> sequences that are eligible for transformation, so it looks like you
> may still have to look at the opcode. But it might be the case that in
> Scan::global(), all we need to know is that *some* transformation is
> going to happen that will remove the need for the GOT entry -- it
> doesn't really matter which one.
> HJ, can you clarify? If we have a GOTPCRELX relocation, what other
> conditions are sufficient to guarantee that one of the proposed
> translations will take place during relocation?

All GOTPCRELX relocations can be converted if symbol is resolved
locally without relocation overflow.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]