[PATCH] D59742: [llvm-dlltool] Set a proper machine type for weak symbol object files

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 02:01:48 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL356982: [llvm-dlltool] Set a proper machine type for weak symbol object files (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D59742?vs=192015&id=192249#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59742/new/

https://reviews.llvm.org/D59742

Files:
  llvm/trunk/lib/Object/COFFImportFile.cpp
  llvm/trunk/test/tools/llvm-dlltool/coff-weak-exports.def


Index: llvm/trunk/lib/Object/COFFImportFile.cpp
===================================================================
--- llvm/trunk/lib/Object/COFFImportFile.cpp
+++ llvm/trunk/lib/Object/COFFImportFile.cpp
@@ -495,7 +495,7 @@
 
   // COFF Header
   coff_file_header Header{
-      u16(0),
+      u16(Machine),
       u16(NumberOfSections),
       u32(0),
       u32(sizeof(Header) + (NumberOfSections * sizeof(coff_section))),
Index: llvm/trunk/test/tools/llvm-dlltool/coff-weak-exports.def
===================================================================
--- llvm/trunk/test/tools/llvm-dlltool/coff-weak-exports.def
+++ llvm/trunk/test/tools/llvm-dlltool/coff-weak-exports.def
@@ -1,5 +1,6 @@
 ; RUN: llvm-dlltool -m i386:x86-64 --input-def %s --output-lib %t.a
 ; RUN: llvm-nm %t.a | FileCheck %s
+; RUN: llvm-readobj %t.a | FileCheck -check-prefix=ARCH %s
 
 LIBRARY test.dll
 EXPORTS
@@ -26,3 +27,5 @@
 ; CHECK-NEXT: W __imp_ImpLibName2
 ; CHECK:      T ImpLibName3
 ; CHECK-NEXT: T __imp_ImpLibName3
+
+; ARCH-NOT: unknown arch


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59742.192249.patch
Type: text/x-patch
Size: 1036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190326/d2b9ac05/attachment.bin>


More information about the llvm-commits mailing list