summaryrefslogtreecommitdiff
path: root/test/ELF/version-script-noundef.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:48:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:48:50 +0000
commit1c98619801a5705c688e683be3ef9d70169a0686 (patch)
tree8422105cd1a94c368315f2db16b9ac746cf7c000 /test/ELF/version-script-noundef.s
parentf4f3ce4613680903220815690ad79fc7ba0a2e26 (diff)
Notes
Diffstat (limited to 'test/ELF/version-script-noundef.s')
-rw-r--r--test/ELF/version-script-noundef.s22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/ELF/version-script-noundef.s b/test/ELF/version-script-noundef.s
new file mode 100644
index 0000000000000..4a251d6172da8
--- /dev/null
+++ b/test/ELF/version-script-noundef.s
@@ -0,0 +1,22 @@
+# REQUIRES: x86
+
+# RUN: echo "VERSION_1.0{ \
+# RUN: global: bar; \
+# RUN: };" > %t.script
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: not ld.lld --version-script %t.script -shared --no-undefined-version \
+# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR1 %s
+# ERR1: version script assignment of VERSION_1.0 to symbol bar failed: symbol not defined
+
+# RUN: echo "VERSION_1.0{ \
+# RUN: global: und; \
+# RUN: };" > %t2.script
+# RUN: not ld.lld --version-script %t2.script -shared --no-undefined-version \
+# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR2 %s
+# ERR2: version script assignment of VERSION_1.0 to symbol und failed: symbol not defined
+
+.text
+.globl foo
+.type foo,@function
+foo:
+callq und@PLT