This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][x86_64] Convert indirect call via GOT to direct when possible
- From: Rafael EspÃndola <rafael dot espindola at gmail dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, binutils <binutils at sourceware dot org>, Cary Coutant <ccoutant at gmail dot com>, David Li <davidxl at google dot com>
- Date: Tue, 24 May 2016 22:06:16 -0400
- Subject: Re: [PATCH][x86_64] Convert indirect call via GOT to direct when possible
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8HmxxdBpS7w8udZgK0QFi5TnenU3wGhpPfhWeKE8Tr=thvA at mail dot gmail dot com> <CAMe9rOpk3aOK5mMkKvYQyzeQxJ-h8o+3KjLRikKSkLmMfqoUtg at mail dot gmail dot com> <CAAs8Hmy5JtTXKLXW+OrnaNZdWJLcx8QUsRaB+Y2kfN8DuozEew at mail dot gmail dot com> <CAMe9rOpaW8oPXzm315ntp4ccp0==2TEJpn0CwJ=vg+m5gHWE6A at mail dot gmail dot com> <CAAs8Hmxj_VUY1fCZDWfhRadJYKNM-CqyLB_P6SAJbPd74OjVfA at mail dot gmail dot com> <CAG3jRe+EtyhdxRcFPJ5A-wBzfJWe9odVM2p_R6pfubzkf-t8pw at mail dot gmail dot com> <CAAs8HmwQ5HHnFCwKqyycfpJ=cZxNLG25h_9u8ECccxN_Ra3c4Q at mail dot gmail dot com>
On 24 May 2016 at 18:58, Sriraman Tallam <tmsriram@google.com> wrote:
> On Tue, May 24, 2016 at 3:39 PM, Rafael EspÃndola
> <rafael.espindola@gmail.com> wrote:
>> You need a R_X86_64_GOTPCRELX. Pass -mrelax-relocations=yes to a new
>> version of gas.
>
> Thanks! I will try that but why is this conversion not applicable for
> just R_X86_64_GOTPCREL? What is the difference?
The guarantees. It is hard (impossible?) to disassemble backwards in
x86, so the assembler produces these relocations to let the linker
know that the transformation is safe.
Cheers,
Rafael