summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-05-15 15:56:23 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-05-15 15:56:23 +0000
commit04bf953de4a12ead16112b4cea3111806199de02 (patch)
tree3fe5559545b69759be99f8c5a93c1f2ca404ac26 /llvm/test
parent7d2f06ae22795c05d6a9974979fbb1488548482a (diff)
downloadbcm5719-llvm-04bf953de4a12ead16112b4cea3111806199de02.tar.gz
bcm5719-llvm-04bf953de4a12ead16112b4cea3111806199de02.zip
Add an extra test for archive symbol tables.
The table should include only defined symbols. llvm-svn: 303075
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Object/X86/archive-symbol-table.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Object/X86/archive-symbol-table.s b/llvm/test/Object/X86/archive-symbol-table.s
new file mode 100644
index 00000000000..2e6fcbed60b
--- /dev/null
+++ b/llvm/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
OpenPOWER on IntegriCloud