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