aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/weak-undef.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/weak-undef.s')
-rw-r--r--test/ELF/weak-undef.s21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ELF/weak-undef.s b/test/ELF/weak-undef.s
new file mode 100644
index 000000000000..02555535927e
--- /dev/null
+++ b/test/ELF/weak-undef.s
@@ -0,0 +1,21 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: ld.lld %t.o -o %t -pie
+# RUN: llvm-readobj -dyn-symbols %t | FileCheck %s
+
+# CHECK: DynamicSymbols [
+# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Name: @ (0)
+# CHECK-NEXT: Value: 0x0
+# CHECK-NEXT: Size: 0
+# CHECK-NEXT: Binding: Local (0x0)
+# CHECK-NEXT: Type: None (0x0)
+# CHECK-NEXT: Other: 0
+# CHECK-NEXT: Section: Undefined (0x0)
+# CHECK-NEXT: }
+# CHECK-NEXT: ]
+
+.weak foo
+
+.globl _start
+_start: