From 40e22518fcb65980e4a39eb2b926bbf65ba69829 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 28 Aug 2015 07:40:30 +0000 Subject: 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 --- test/Object/archive-symtab.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/Object/archive-symtab.test') 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 -- cgit v1.2.3