diff options
author | Amy Kwan <amy.kwan1@ibm.com> | 2023-09-05 10:54:26 -0500 |
---|---|---|
committer | Amy Kwan <amy.kwan1@ibm.com> | 2023-09-05 12:15:14 -0500 |
commit | f0b2f6954101c9052763a99a1e7ac135770e779a (patch) | |
tree | a0bd98d1e1d340ef0d161fb0aa9806c648eba8d7 /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | be0e42c16b8cfb59d5e8e3527141cd7f4931cd17 (diff) | |
download | llvm-f0b2f6954101c9052763a99a1e7ac135770e779a.zip llvm-f0b2f6954101c9052763a99a1e7ac135770e779a.tar.gz llvm-f0b2f6954101c9052763a99a1e7ac135770e779a.tar.bz2 |
[AIX][TLS] Generate .extern and .ref references to __tls_get_addr for local-exec accesses.
Compiling with TLS variables requires -pthread, but if the user omits this
option, the compiler will not show any obvious indication during compilation
that -pthread is needed for programs using TLS variables. Instead, the user will
experience a segmentation fault when running programs with TLS variables in them
and without specifying -pthread.
This patch aims to generate .extern/.ref references to __tls_get_addr[DS] for
local-exec accesses, in order to trigger an error from the linker to indicate
that there is an undefined symbol to __tls_get_addr. Doing so will remind the
user to compile/link with -pthread.
Differential Revision: https://reviews.llvm.org/D151335
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions