aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/out-of-order.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/linkerscript/out-of-order.s')
-rw-r--r--test/ELF/linkerscript/out-of-order.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/out-of-order.s b/test/ELF/linkerscript/out-of-order.s
new file mode 100644
index 000000000000..9c6547a68643
--- /dev/null
+++ b/test/ELF/linkerscript/out-of-order.s
@@ -0,0 +1,10 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-linux %s -o %t.o
+# RUN: echo "SECTIONS { .data 0x4000 : { *(.data) } .text 0x2000 : { *(.text) } }" > %t.script
+# RUN: not ld.lld -o %t.so --script %t.script %t.o -shared 2>&1 | FileCheck %s
+
+# CHECK: error: {{.*}}.script:1: unable to move location counter backward
+
+.quad 0
+.data
+.quad 0