[PATCH] D62106: [X86] Support -fno-plt __tls_get_addr calls
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 7 04:57:55 PDT 2019
nikic added a comment.
I'm seeing linker failures that I suspect are related to this change:
/usr/bin/ld: /home/nikic/rust/foo/libtest2.rlib(test2.test2.3a1fbbbh-cgu.0.rcgu.o): TLS transition from R_X86_64_TLSLD to R_X86_64_TPOFF32 against `_ZN5test24TEST17h9cebda1c5e0bffdeE' at 0x4 in section `.text._ZN5test28get_test17h7831513ccc936b83E' failed
Old:
0000000000000000 <_ZN5test28get_test17h7831513ccc936b83E>:
0: 50 push %rax
1: 48 8d 3d 00 00 00 00 lea 0x0(%rip),%rdi # 8 <_ZN5test28get_test17h7831513ccc936b83E+0x8>
4: R_X86_64_TLSLD _ZN5test24TEST17h9cebda1c5e0bffdeE-0x4
8: e8 00 00 00 00 callq d <_ZN5test28get_test17h7831513ccc936b83E+0xd>
9: R_X86_64_PLT32 __tls_get_addr-0x4
d: 48 8b 80 00 00 00 00 mov 0x0(%rax),%rax
10: R_X86_64_DTPOFF32 _ZN5test24TEST17h9cebda1c5e0bffdeE
14: 59 pop %rcx
15: c3 retq
New:
0000000000000000 <_ZN5test28get_test17h7831513ccc936b83E>:
0: 50 push %rax
1: 48 8d 3d 00 00 00 00 lea 0x0(%rip),%rdi # 8 <_ZN5test28get_test17h7831513ccc936b83E+0x8>
4: R_X86_64_TLSLD _ZN5test24TEST17h9cebda1c5e0bffdeE-0x4
8: ff 15 00 00 00 00 callq *0x0(%rip) # e <_ZN5test28get_test17h7831513ccc936b83E+0xe>
a: R_X86_64_GOTPCREL __tls_get_addr-0x4
e: 48 8b 80 00 00 00 00 mov 0x0(%rax),%rax
11: R_X86_64_DTPOFF32 _ZN5test24TEST17h9cebda1c5e0bffdeE
15: 59 pop %rcx
16: c3 retq
I'm not really familiar with TLS relocations -- do you have any pointers on what could be going wrong here?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62106/new/
https://reviews.llvm.org/D62106
More information about the llvm-commits
mailing list