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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 1 06:15:54 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.
----------------
nikic wrote:

Huh. It would be good to file a bug for that...

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


More information about the llvm-commits mailing list