This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [x86-64-psABI] RFC: Add R_X86_64_RELAX_PC32 and R_X86_64_RELAX_PLT32
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: "x86-64-abi at googlegroups dot com" <x86-64-abi at googlegroups dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 18 May 2015 05:52:46 -0700
- Subject: Re: [x86-64-psABI] RFC: Add R_X86_64_RELAX_PC32 and R_X86_64_RELAX_PLT32
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOp9tv1bnUPJ6s=NR7=5srs48Vqn5-L0Te9agSNSUTyrkw at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1505111744400 dot 4883 at wotan dot suse dot de> <CAMe9rOqcLsgDsqFU5mOnA6fQ+wRsNwCpJLiRYDKS1mhcdqfyoA at mail dot gmail dot com> <CAMe9rOokKUoQ=W+oKmFfCHiAeTCAqtYAykOdq2muR+qe-Og6vQ at mail dot gmail dot com> <CAMe9rOqXb9wRpS9ik+Ax5fZ_8qmd3DwU574mJKV+Vm1rs=HHsw at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1505181437310 dot 27315 at wotan dot suse dot de>
On Mon, May 18, 2015 at 5:45 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Sun, 17 May 2015, H.J. Lu wrote:
>
>> To remove one direct branch to PLT for external function calls:
>>
>> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00001.html
>>
>> I am proposing to add 2 new relocations, R_X86_64_RELAX_PC32 and
>> R_X86_64_RELAX_GOTPCREL:
>>
>> 1. R_X86_64_RELAX_PC32 can only be used on 32-bit direct call/jmp
>> instructions with a relax prefix, 0x67, which is the address size
>> prefix and is ignored by 32-bit direct call/jmp instructions in both
>> 32-bit and 64-bit modes.
>
> Hmm, are we Really Sure, this use of a prefix doesn't hit us over the head
> somewhen? Why can't we simply use a 0x90 nop for this? After all, those
> are free in recent pipelines, and new enough binutils supporting this
> scheme will remove it anyway (in one direction), or are free to add any
> one byte padding they require (for direct jumps they can for instance add
> it _after_ the jump making it totally free).
This proposal has been replaced by
https://groups.google.com/forum/#!topic/x86-64-abi/JZzuYlRKH8o
--
H.J.