[PATCH] x86: Disallow TLS relocation in non executable section
H.J. Lu
hjl.tools@gmail.com
Thu Oct 2 22:06:49 GMT 2025
On Tue, Sep 30, 2025 at 10:35 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Since TLS relocations are applied to executable machine instructions,
> disallow TLS relocation in non-SHT_PROGBITS, non-SHF_EXECINSTR section.
>
> PR ld/33451
> PR ld/33502
> * elf32-i386.c (elf_i386_tls_transition): Disallow TLS relocation
> in non-SHT_PROGBITS, non-SHF_EXECINSTR section.
> * elf32-i386.c (elf_i386_scan_relocs): Likewise.
> * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
> * elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
>
> --
> H.J.
This is the patch I am checking in.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Disallow-TLS-relocation-in-non-executable-sectio.patch
Type: text/x-patch
Size: 4768 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251003/53a48c20/attachment.bin>
More information about the Binutils
mailing list