[PATCH] D36634: [lld] [COFF] Don't produce weak aliases in import libraries

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 22:24:05 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL310992: [COFF] Don't produce weak aliases in import libraries (authored by mstorsjo).

Changed prior to commit:
  https://reviews.llvm.org/D36634?vs=110793&id=111310#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36634

Files:
  lld/trunk/COFF/Driver.cpp
  lld/trunk/test/COFF/export.test


Index: lld/trunk/COFF/Driver.cpp
===================================================================
--- lld/trunk/COFF/Driver.cpp
+++ lld/trunk/COFF/Driver.cpp
@@ -473,7 +473,7 @@
   }
 
   writeImportLibrary(getImportName(AsLib), getImplibPath(), Exports,
-                     Config->Machine);
+                     Config->Machine, false);
 }
 
 static void parseModuleDefs(StringRef Path) {
Index: lld/trunk/test/COFF/export.test
===================================================================
--- lld/trunk/test/COFF/export.test
+++ lld/trunk/test/COFF/export.test
@@ -39,16 +39,19 @@
 CHECK3-NEXT:       5   0x1008
 CHECK3-NEXT:       6   0x1010  exportfn2
 
-# RUN: lld-link /out:%t.dll /dll %t.obj /export:f1=exportfn1 /export:f2=exportfn2
+# RUN: lld-link /out:%t.dll /dll %t.obj /export:f1=exportfn1 /export:f2=exportfn2 /implib:%t.lib
 # RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK4 %s
+# RUN: llvm-nm %t.lib | FileCheck -check-prefix=CHECK4-NM %s
 
 CHECK4:      Export Table:
 CHECK4:      DLL name: export.test.tmp.dll
 CHECK4:      Ordinal      RVA  Name
 CHECK4-NEXT:       0        0
 CHECK4-NEXT:       1   0x1010  exportfn3
 CHECK4-NEXT:       2   0x1008  f1
 CHECK4-NEXT:       3   0x1010  f2
+CHECK4-NM: 00000000 T f1
+CHECK4-NM: 00000000 T f2
 
 # RUN: echo "EXPORTS exportfn1 @3" > %t.def
 # RUN: echo "fn2=exportfn2 @2" >> %t.def


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36634.111310.patch
Type: text/x-patch
Size: 1376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170816/0a25775e/attachment.bin>


More information about the llvm-commits mailing list