[llvm] [RelLookupTableConverter] Drop unnamed_addr to avoid generating GOTPCREL relocations (PR #142304)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 04:42:04 PDT 2025


================
@@ -110,6 +110,11 @@ static GlobalVariable *createRelLookupTable(Function &Func,
 
   for (Use &Operand : LookupTableArr->operands()) {
     Constant *Element = cast<Constant>(Operand);
+    // Drop unnamed_addr to avoid matching pattern in
+    // `handleIndirectSymViaGOTPCRel`, which generates GOTPCREL relocations not
+    // supported by the GNU linker and LLD versions below 18 on aarch64.
----------------
dianqk wrote:

Filed: https://sourceware.org/bugzilla/show_bug.cgi?id=33043.

https://github.com/llvm/llvm-project/pull/142304


More information about the llvm-commits mailing list