This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] x86-64: Add ENDBR64 to the TLSDESC PLT entry


*** TEST RESULTS FOR COMMIT bf54968b128a2133174d81c438d402ecfaf83042 ***

Author: H.J. Lu <hjl.tools@gmail.com>
Branch: master
Commit: bf54968b128a2133174d81c438d402ecfaf83042

x86-64: Add ENDBR64 to the TLSDESC PLT entry

The TLSDESC entry in a lazy procedure linkage table is called indirectly
with "callq *(%rax)".  This patch adds an ENDBR64 to support indirect
branch tracking in Intel CET.  The TLSDESC PLT entry now looks like:

0xf3, 0x0f, 0x1e, 0xfa,  /* endbr64             */
0xff, 0x35, 8, 0, 0, 0,  /* pushq GOT+8(%rip)   */
0xff, 0x25, 16, 0, 0, 0  /* jmpq *GOT+TDG(%rip)  */

The BND prefix isn't needed since MPX isn't used for TLSDESC.

bfd/

	PR ld/23000
	* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
	ENDBR64 to the TLSDESC PLT entry.

ld/

	PR ld/23000
	* testsuite/ld-x86-64/tlsdesc.pd: Updated.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]