summaryrefslogtreecommitdiff
path: root/test/ELF/arm-use-r-output.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/arm-use-r-output.s')
-rw-r--r--test/ELF/arm-use-r-output.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ELF/arm-use-r-output.s b/test/ELF/arm-use-r-output.s
new file mode 100644
index 000000000000..918362466d3a
--- /dev/null
+++ b/test/ELF/arm-use-r-output.s
@@ -0,0 +1,13 @@
+// REQUIRES: arm
+// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
+// RUN: ld.lld -r %t.o -o %t2.o
+// RUN: ld.lld -shared %t2.o -o %t.so
+
+// We used to crash using the output of -r because of the relative order of
+// SHF_LINK_ORDER sections.
+
+// That can be fixed by changing -r or making the regular link more flexible,
+// so this is an end to end test.
+
+ .fnstart
+ .fnend