[all-commits] [llvm/llvm-project] f0b2f6: [AIX][TLS] Generate .extern and .ref references to...
Amy Kwan via All-commits
all-commits at lists.llvm.org
Tue Sep 5 10:15:33 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f0b2f6954101c9052763a99a1e7ac135770e779a
https://github.com/llvm/llvm-project/commit/f0b2f6954101c9052763a99a1e7ac135770e779a
Author: Amy Kwan <amy.kwan1 at ibm.com>
Date: 2023-09-05 (Tue, 05 Sep 2023)
Changed paths:
M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
M llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-double.ll
M llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-float.ll
M llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-int.ll
M llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-longlong.ll
M llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc-large.ll
M llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list