aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/x86-64-reloc-range.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/x86-64-reloc-range.s')
-rw-r--r--test/ELF/x86-64-reloc-range.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ELF/x86-64-reloc-range.s b/test/ELF/x86-64-reloc-range.s
new file mode 100644
index 000000000000..8319eaafa0ce
--- /dev/null
+++ b/test/ELF/x86-64-reloc-range.s
@@ -0,0 +1,13 @@
+// RUN: llvm-mc %s -o %t.o -triple x86_64-pc-linux -filetype=obj
+// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+
+// CHECK: relocation R_X86_64_PC32 out of range
+// CHECK-NOT: relocation
+
+ lea foo(%rip), %rax
+ lea foo(%rip), %rax
+
+ .hidden foo
+ .bss
+ .zero 0x7fffe007
+foo: