summaryrefslogtreecommitdiff
path: root/test/Object/archive-symtab.test
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-08-28 07:40:30 +0000
committerRui Ueyama <ruiu@google.com>2015-08-28 07:40:30 +0000
commit40e22518fcb65980e4a39eb2b926bbf65ba69829 (patch)
tree2262a4e4cc1ae2a712cfff74cbf7fb96be7cff3c /test/Object/archive-symtab.test
parent109cab44506140a5671d9b0b1643c9bd5558e6cb (diff)
Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF short import files
This patch includes a fix for a llvm-readobj test. With this patch, the tool does no longer print out COFF headers for the short import file, but that's probably desirable because the header for the short import file is dummy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/archive-symtab.test')
-rw-r--r--test/Object/archive-symtab.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Object/archive-symtab.test b/test/Object/archive-symtab.test
index c50833d6a77..120401bad36 100644
--- a/test/Object/archive-symtab.test
+++ b/test/Object/archive-symtab.test
@@ -99,6 +99,16 @@ MACHO-NEXT: 0000000000000000 t _bar
MACHO-NEXT: 0000000000000001 T _foo
MACHO-NEXT: 0000000000000002 T _main
+RUN: rm -f %t.a
+RUN: llvm-ar --format=gnu rcsU %t.a %p/Inputs/coff-short-import-code %p/Inputs/coff-short-import-data
+RUN: llvm-nm -M %t.a | FileCheck --check-prefix=COFF-SHORT-IMPORT %s
+
+COFF-SHORT-IMPORT: Archive map
+COFF-SHORT-IMPORT-NEXT: _foo in coff-short-import-code
+COFF-SHORT-IMPORT-NEXT: __imp__foo in coff-short-import-code
+COFF-SHORT-IMPORT-NEXT: _bar in coff-short-import-data
+COFF-SHORT-IMPORT-NOT: __imp__bar in coff-short-import-data
+
Test that we pad the symbol table so that it ends in a multiple of 4 bytes:
8 + 60 + 36 == 104
RUN: rm -f %t.a