aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/copy-rel-symbol-value-err.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/linkerscript/copy-rel-symbol-value-err.s')
-rw-r--r--test/ELF/linkerscript/copy-rel-symbol-value-err.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/copy-rel-symbol-value-err.s b/test/ELF/linkerscript/copy-rel-symbol-value-err.s
new file mode 100644
index 000000000000..f134edbb1d0c
--- /dev/null
+++ b/test/ELF/linkerscript/copy-rel-symbol-value-err.s
@@ -0,0 +1,12 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/copy-rel-symbol-value.s -o %t2.o
+# RUN: ld.lld %t2.o -o %t2.so -shared
+# RUN: echo "SECTIONS { . = . + SIZEOF_HEADERS; foo = bar; }" > %t.script
+# RUN: not ld.lld %t.o %t2.so --script %t.script -o %t 2>&1 | FileCheck %s
+
+# CHECK: symbol not found: bar
+
+.global _start
+_start:
+.quad bar@got