aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ELF/relocation.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/ELF/relocation.s')
-rw-r--r--test/MC/ELF/relocation.s17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s
index c0e6007..de2b434 100644
--- a/test/MC/ELF/relocation.s
+++ b/test/MC/ELF/relocation.s
@@ -34,6 +34,15 @@ bar:
movl $_GLOBAL_OFFSET_TABLE_, %eax
movabs $_GLOBAL_OFFSET_TABLE_, %rax
+ .quad blah@SIZE # R_X86_64_SIZE64
+ .quad blah@SIZE + 32 # R_X86_64_SIZE64
+ .quad blah@SIZE - 32 # R_X86_64_SIZE64
+ movl blah@SIZE, %eax # R_X86_64_SIZE32
+ movl blah@SIZE + 32, %eax # R_X86_64_SIZE32
+ movl blah@SIZE - 32, %eax # R_X86_64_SIZE32
+
+ .long foo@gotpcrel
+ .long foo@plt
// CHECK: Section {
// CHECK: Name: .rela.text
// CHECK: Relocations [
@@ -62,6 +71,14 @@ bar:
// CHECK-NEXT: 0x98 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFB
// CHECK-NEXT: 0x9D R_X86_64_GOTPC32 _GLOBAL_OFFSET_TABLE_ 0x1
// CHECK-NEXT: 0xA3 R_X86_64_GOTPC64 _GLOBAL_OFFSET_TABLE_ 0x2
+// CHECK-NEXT: 0xAB R_X86_64_SIZE64 blah 0x0
+// CHECK-NEXT: 0xB3 R_X86_64_SIZE64 blah 0x20
+// CHECK-NEXT: 0xBB R_X86_64_SIZE64 blah 0xFFFFFFFFFFFFFFE0
+// CHECK-NEXT: 0xC6 R_X86_64_SIZE32 blah 0x0
+// CHECK-NEXT: 0xCD R_X86_64_SIZE32 blah 0x20
+// CHECK-NEXT: 0xD4 R_X86_64_SIZE32 blah 0xFFFFFFFFFFFFFFE0
+// CHECK-NEXT: 0xD8 R_X86_64_GOTPCREL foo 0x0
+// CHECK-NEXT: 0xDC R_X86_64_PLT32 foo 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: }