[PATCH] x86-64: Fix TLSDESC relaxation for x32
H.J. Lu
hjl.tools@gmail.com
Sun Jan 19 19:53:00 GMT 2020
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
--
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: 24269 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200119/1eb065a4/attachment.bin>
More information about the Binutils
mailing list