summaryrefslogtreecommitdiff
path: root/test/ELF/arm-thumb-interwork-thunk-range.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/arm-thumb-interwork-thunk-range.s')
-rw-r--r--test/ELF/arm-thumb-interwork-thunk-range.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ELF/arm-thumb-interwork-thunk-range.s b/test/ELF/arm-thumb-interwork-thunk-range.s
new file mode 100644
index 0000000000000..db674f4d5f7c9
--- /dev/null
+++ b/test/ELF/arm-thumb-interwork-thunk-range.s
@@ -0,0 +1,15 @@
+// REQUIRES: arm
+// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
+// RUN: ld.lld %t.o -o %t -image-base=0x80000000
+
+// Test that when the thunk is at a high address we don't get confused with it
+// being out of range.
+
+.thumb
+.global _start
+_start:
+b.w foo
+
+.arm
+.weak foo
+foo: