[PATCH] x86-64: Fix TLSDESC relaxation for x32

H.J. Lu hjl.tools@gmail.com
Mon Jan 20 14:56:00 GMT 2020


On Sun, Jan 19, 2020 at 11:52 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Sat, Jan 18, 2020 at 6:44 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Sat, Jan 18, 2020 at 3:07 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> > >
> > > For X32, TLSDESC sequences can be
> > >
> > > 8d 05 00 00 00 00       lea     x@TLSDESC(%rip), %eax
> > > 67 ff 10                call    *x@TLSCALL(%eax)
> > >
> >
> > For x32, we must encode "lea x@TLSDESC(%rip), %reg" with a REX prefix
> > even if it isn't required.  Otherwise linker can’t safely perform GDesc -> LE
> > optimization.  If the lea encoding has a variable length, linker can't
> > tell where
> > it starts.  Here is the updated patch to always generate a REX prefix.
> >
>
> Here is the updated patch to handle  GDesc -> IE optimization.
> BTW, I posted x86-64 psABI update at
>
> https://gitlab.com/x86-psABIs/x86-64-ABI/merge_requests/4
>

This is the patch I am checking in.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-64-Fix-TLSDESC-relaxation-for-x32.patch
Type: text/x-patch
Size: 25669 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200120/016f73e7/attachment.bin>


More information about the Binutils mailing list