[PATCH] D18166: Add _GLOBAL_OFFSET_TABLE_ symbol to shared libraries

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 10:44:51 PDT 2016


rafael added inline comments.

================
Comment at: ELF/Driver.cpp:351
@@ -350,2 +350,3 @@
+  if (!Config->Relocatable)
     // In the assembly for 32 bit x86 the _GLOBAL_OFFSET_TABLE_ symbol
     // is magical and is used to produce a R_386_GOTPC relocation.
----------------
You don't need the '('

================
Comment at: test/ELF/global_offset_table_shared.s:2
@@ +1,3 @@
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
+// RUN: ld.lld -shared %t -o %t2
+.long _GLOBAL_OFFSET_TABLE_
----------------
You are not checking that the symbol is not undefined, so this should pass even with your patch reverted.


http://reviews.llvm.org/D18166





More information about the llvm-commits mailing list