[lld] [llvm] IRSymTab: Record _GLOBAL_OFFSET_TABLE_ for ELF x86 (PR #89463)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 16:37:30 PDT 2024


================
@@ -1,5 +1,5 @@
 ; RUN: llvm-as %s -o %t.o
-; RUN: llvm-lto2 run -r %t.o,_start,px %t.o -o %t.s
+; RUN: llvm-lto2 run -r %t.o,_start,px -r %t.o,_GLOBAL_OFFSET_TABLE_, %t.o -o %t.s
----------------
MaskRay wrote:

For x86-64 medium/large code model, the IR symbol table now references `_GLOBAL_OFFSET_TABLE_`, which requires llvm-lto2 to provide it to avoid a ` missing symbol resolution for ` error

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


More information about the llvm-commits mailing list