https://sourceware.org/bugzilla/show_bug.cgi?id=26972
Bug ID: 26972 Summary: R_X86_64_TLSDESC_CALL/R_X86_64_GOTPC32_TLSDESC need improvement Product: binutils Version: 2.36 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: hjl.tools at gmail dot com CC: ian at airs dot com Target Milestone: --- Target: x86-65 tls_shared_gnu2_test failed on CET enabled Tiger Lake machine when binutils is compiled with -fcf-protection: Dump of assembler code for function _Z2t1v: 0x00007ffff77c4d10 <+0>: endbr64 0x00007ffff77c4d14 <+4>: sub $0x8,%rsp 0x00007ffff77c4d18 <+8>: lea 0x22f9(%rip),%rax # 0x7ffff77c7018 <v...@got.plt> 0x00007ffff77c4d1f <+15>: call *(%rax) => 0x00007ffff77c4d21 <+17>: add %fs:0x0,%rax Gold resolves v...@got.plt in 0000000000000000 <_Z2t1v>: 0: f3 0f 1e fa endbr64 4: 48 83 ec 08 sub $0x8,%rsp 8: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # f <_Z2t1v+0xf> b: R_X86_64_GOTPC32_TLSDESC v1-0x4 f: ff 10 call *(%rax) f: R_X86_64_TLSDESC_CALL v1 to the first entry of PLT without endbr64 (gdb) disass 0x00007ffff77c4c10,+16 Dump of assembler code from 0x7ffff77c4c10 to 0x7ffff77c4c20: => 0x00007ffff77c4c10: push 0x23da(%rip) # 0x7ffff77c6ff0 <_GLOBAL_OFF SET_TABLE_+8> 0x00007ffff77c4c16: bnd jmp *0x23c3(%rip) # 0x7ffff77c6fe0 0x00007ffff77c4c1d: nopl (%rax) End of assembler dump. (gdb) Program received signal SIGSEGV, Segmentation fault. 0x00007ffff77c4c10 in ?? () from ./tls_test_gnu2_shared.so (gdb) bt #0 0x00007ffff77c4c10 in ?? () from ./tls_test_gnu2_shared.so #1 0x00007ffff77c4d21 in t1 () at /export/gnu/import/git/gitlab/x86-binutils/gold/testsuite/tls_test.cc:87 #2 0x000000000040121f in thread_routine (arg=arg@entry=0x0) at /export/gnu/import/git/gitlab/x86-binutils/gold/testsuite/tls_test_main.c c:87 #3 0x0000000000400ebf in main () at /export/gnu/import/git/gitlab/x86-binutils/gold/testsuite/tls_test_main.c c:122 (gdb) -- You are receiving this mail because: You are on the CC list for the bug.