[PATCH] i386: Don't emit unsupported TLS relocs on Solaris [PR13671]

H.J. Lu hjl.tools@gmail.com
Thu Jan 19 21:55:39 GMT 2023


On Tue, Jan 17, 2023 at 3:25 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> 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.
>

I checked it in.

Thanks.

-- 
H.J.


More information about the Binutils mailing list