summaryrefslogtreecommitdiff
path: root/test/Object/X86/archive-symbol-table.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/Object/X86/archive-symbol-table.s')
-rw-r--r--test/Object/X86/archive-symbol-table.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Object/X86/archive-symbol-table.s b/test/Object/X86/archive-symbol-table.s
new file mode 100644
index 0000000000000..2e6fcbed60b1c
--- /dev/null
+++ b/test/Object/X86/archive-symbol-table.s
@@ -0,0 +1,19 @@
+# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
+# RUN: rm -f %t
+# RUN: llvm-ar rcs %t %t.o
+# RUN: llvm-nm -M %t | FileCheck %s
+
+# Test that weak undefined symbols don't show up in the archive symbol
+# table.
+
+.global foo
+foo:
+.weak bar
+.quad bar
+
+# CHECK: Archive map
+# CHECK-NEXT: foo in archive-symbol-table.s.tmp.o
+# CHECK-NOT: in
+# CHECK: archive-symbol-table.s.tmp.o
+# CHECK-NEXT: w bar
+# CHECK-NEXT: T foo