[x86-64 psABI] RFC: Extend x86-64 PLT entry to support MPX

H.J. Lu hjl.tools@gmail.com
Wed Jul 24 15:22:00 GMT 2013


On Wed, Jul 24, 2013 at 1:43 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 07/23/2013 09:49 PM, H.J. Lu wrote:
>>
>>   2. Extend the current 16-byte PLT entry:
>>
>>    ff 25 32 8b 21 00        jmpq   *name@GOTPCREL(%rip)
>>    68 00 00 00 00           pushq  $index
>>    e9 00 00 00 00           jmpq   PLT0
>>
>>      which clear bound registers, to 32-byte to add BND prefix to branch
>>      instructions.
>
>
> Would it be possible to use a different instruction sequence that stays in
> the 16 byte limit?  Or restrict MPX support to BIND_NOW relocations?
>

It isn't possible to use different insns in PLT to add BND prefix.
The issue isn't about relocation.  The issue is external calls
are routed via PLT entry, which clears bound registers.  That
is why we need to use a different PLT entry to preserve bound
registers.


--
H.J.



More information about the Binutils mailing list