aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/expr-invalid-sec.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/linkerscript/expr-invalid-sec.s')
-rw-r--r--test/ELF/linkerscript/expr-invalid-sec.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/expr-invalid-sec.s b/test/ELF/linkerscript/expr-invalid-sec.s
new file mode 100644
index 000000000000..9476be3c3b14
--- /dev/null
+++ b/test/ELF/linkerscript/expr-invalid-sec.s
@@ -0,0 +1,6 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: echo "SECTIONS { foo = ADDR(.text) + ADDR(.text); };" > %t.script
+# RUN: not ld.lld -o %t.so --script %t.script %t.o -shared 2>&1 | FileCheck %s
+
+# CHECK: At least one side of the expression must be absolute