[PATCH] i386: Don't emit unsupported TLS relocs on Solaris [PR13671]
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Jan 17 11:25:23 GMT 2023
As detailed in PR ld/13671, gld can emit R_386_TLS_TPOFF32 relocs which
the Solaris/x86 ld.so.1 doesn't know about, so the resulting executables
won't run.
The following patch, which H.J. provided in the PR, fixes this.
Tested on i386-pc-solaris2.11 (both with the binutils testsuite and a
full gcc bootstrap) and i686-pc-linux-gnu.
Already approved by H.J. in the PR, but it's probably best if someone
double-checks the ChangeLog entry.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2023-01-17 H.J. Lu <hongjiu.lu@intel.com>
bfd:
PR ld/13671
* elf32-i386.c (elf_i386_tls_transition): Only emit R_386_TLS_LE,
R_386_TLS_IE on Solaris.
(elf_i386_relocate_section): Only use R_386_TLS_GD->R_386_TLS_LE
transition on Solaris.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: local.patch6
Type: text/x-patch
Size: 3514 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20230117/f49a0dbb/attachment.bin>
More information about the Binutils
mailing list