summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-12-09 03:03:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-12-09 03:03:58 +0000
commit1d5969d839ddc4d0af93fd035aa13131e5c6fa82 (patch)
treef8ece0fa5ab18b73f4147e015731f3b6292f6d26 /test
parent85f5a1ae396880b5f0c4b344217ab3ce6dc70b28 (diff)
downloadllvm-1d5969d839ddc4d0af93fd035aa13131e5c6fa82.tar.gz
llvm-1d5969d839ddc4d0af93fd035aa13131e5c6fa82.tar.bz2
llvm-1d5969d839ddc4d0af93fd035aa13131e5c6fa82.tar.xz
Handle the case of the magical _GLOBAL_OFFSET_TABLE_ showing up in a
symbol difference. This matches gas behavior and fixes PR11513. We still don't handle _GLOBAL_OFFSET_TABLE_ in data sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/ELF/relocation-386.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s
index 442176307f..7604f9e151 100644
--- a/test/MC/ELF/relocation-386.s
+++ b/test/MC/ELF/relocation-386.s
@@ -160,6 +160,11 @@
// CHECK-NEXT: ('r_sym', 0x00000d)
// CHECK-NEXT: ('r_type', 0x21)
// CHECK-NEXT: ),
+// Relocation 25 (_GLOBAL_OFFSET_TABLE_-bar2) is of type R_386_GOTPC.
+// CHECK-NEXT: Relocation 25
+// CHECK-NEXT: (('r_offset', 0x00000094)
+// CHECK-NEXT: ('r_sym', 0x00000b)
+// CHECK-NEXT: ('r_type', 0x0a)
// Section 4 is bss
// CHECK: # Section 4
@@ -225,6 +230,7 @@ bar2:
movl zed@DTPOFF(%eax), %eax
pushl $bar
addl foo@GOTTPOFF(%edx), %eax
+ subl _GLOBAL_OFFSET_TABLE_-bar2, %ebx
.section zedsec,"awT",@progbits
zed: