[PATCH] x86: Disallow TLS relocation in non executable section
H.J. Lu
hjl.tools@gmail.com
Tue Sep 30 02:35:30 GMT 2025
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Disallow-TLS-relocation-in-non-executable-sectio.patch
Type: text/x-patch
Size: 3838 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250930/185149d1/attachment.bin>
More information about the Binutils
mailing list