summaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/locationcountererr.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/linkerscript/locationcountererr.s')
-rw-r--r--test/ELF/linkerscript/locationcountererr.s9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/locationcountererr.s b/test/ELF/linkerscript/locationcountererr.s
new file mode 100644
index 0000000000000..7664d8d46917d
--- /dev/null
+++ b/test/ELF/linkerscript/locationcountererr.s
@@ -0,0 +1,9 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
+# RUN: echo "SECTIONS { .text 0x2000 : {. = 0x10 ; *(.text) } }" > %t.script
+# RUN: not ld.lld %t --script %t.script -o %t1 2>&1 | FileCheck %s
+# CHECK: unable to move location counter backward for: .text
+
+.globl _start
+_start:
+nop