This is the mail archive of the
mailing list for the binutils project.
Re: [x86-64 psABI] RFC: Extend x86-64 PLT entry to support MPX
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, GCC Development <gcc at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>, "Girkar, Milind" <milind dot girkar at intel dot com>, "Kreitzer, David L" <david dot l dot kreitzer at intel dot com>
- Date: Wed, 24 Jul 2013 08:21:52 -0700
- Subject: Re: [x86-64 psABI] RFC: Extend x86-64 PLT entry to support MPX
- References: <CAMe9rOp=1v38F_aV-pbv50YOGSEr_ju+byZP1L_G_h4bm5Ad3w at mail dot gmail dot com> <51EF93C8 dot 8050805 at redhat dot com>
On Wed, Jul 24, 2013 at 1:43 AM, Florian Weimer <firstname.lastname@example.org> 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
> 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