aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/weak-undef-lib.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:08:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:08:33 +0000
commit20d35e67e67f106f617c939725101223211659f0 (patch)
tree64eb963cbf5ba58765e0a6b64a440965d66a7a4d /test/ELF/weak-undef-lib.s
parentae1a339de31cf4065777531959a11e55a2e5fa00 (diff)
Notes
Diffstat (limited to 'test/ELF/weak-undef-lib.s')
-rw-r--r--test/ELF/weak-undef-lib.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/ELF/weak-undef-lib.s b/test/ELF/weak-undef-lib.s
new file mode 100644
index 0000000000000..e4e7f46ebaa99
--- /dev/null
+++ b/test/ELF/weak-undef-lib.s
@@ -0,0 +1,19 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
+# RUN: echo -e '.globl foo\nfoo: ret' | \
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
+
+# RUN: ld.lld -shared -o %t.so %t1.o --start-lib %t2.o
+# RUN: llvm-readobj -dyn-symbols %t.so | FileCheck %s
+
+# CHECK: Name: foo
+# CHECK-NEXT: Value: 0x0
+# CHECK-NEXT: Size: 0
+# CHECK-NEXT: Binding: Weak
+# CHECK-NEXT: Type: None
+# CHECK-NEXT: Other: 0
+# CHECK-NEXT: Section: Undefined
+
+.weak foo
+.data
+.quad foo