[llvm] r303075 - Add an extra test for archive symbol tables.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 08:56:23 PDT 2017


Author: rafael
Date: Mon May 15 10:56:23 2017
New Revision: 303075

URL: http://llvm.org/viewvc/llvm-project?rev=303075&view=rev
Log:
Add an extra test for archive symbol tables.

The table should include only defined symbols.

Added:
    llvm/trunk/test/Object/X86/archive-symbol-table.s

Added: llvm/trunk/test/Object/X86/archive-symbol-table.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/X86/archive-symbol-table.s?rev=303075&view=auto
==============================================================================
--- llvm/trunk/test/Object/X86/archive-symbol-table.s (added)
+++ llvm/trunk/test/Object/X86/archive-symbol-table.s Mon May 15 10:56:23 2017
@@ -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




More information about the llvm-commits mailing list