[lld] r311101 - Merging r310992:
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 10:05:25 PDT 2017
Author: hans
Date: Thu Aug 17 10:05:25 2017
New Revision: 311101
URL: http://llvm.org/viewvc/llvm-project?rev=311101&view=rev
Log:
Merging r310992:
------------------------------------------------------------------------
r310992 | mstorsjo | 2017-08-15 22:23:00 -0700 (Tue, 15 Aug 2017) | 11 lines
[COFF] Don't produce weak aliases in import libraries
When creating an import library from lld, the cases with
Name != ExtName shouldn't end up as a weak alias, but as a real
export of the new name, which is what actually is exported from
the DLL.
This restores the behaviour of renamed exports to what it was in
4.0.
Differential Revision: https://reviews.llvm.org/D36634
------------------------------------------------------------------------
Modified:
lld/branches/release_50/ (props changed)
lld/branches/release_50/COFF/Driver.cpp
lld/branches/release_50/test/COFF/export.test
Propchange: lld/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 17 10:05:25 2017
@@ -1 +1 @@
-/lld/trunk:308492,308728,308935,308998,309002,310526,310989
+/lld/trunk:308492,308728,308935,308998,309002,310526,310989,310992
Modified: lld/branches/release_50/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_50/COFF/Driver.cpp?rev=311101&r1=311100&r2=311101&view=diff
==============================================================================
--- lld/branches/release_50/COFF/Driver.cpp (original)
+++ lld/branches/release_50/COFF/Driver.cpp Thu Aug 17 10:05:25 2017
@@ -470,7 +470,7 @@ static void createImportLibrary(bool AsL
}
writeImportLibrary(getImportName(AsLib), getImplibPath(), Exports,
- Config->Machine);
+ Config->Machine, false);
}
static void parseModuleDefs(StringRef Path) {
Modified: lld/branches/release_50/test/COFF/export.test
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_50/test/COFF/export.test?rev=311101&r1=311100&r2=311101&view=diff
==============================================================================
--- lld/branches/release_50/test/COFF/export.test (original)
+++ lld/branches/release_50/test/COFF/export.test Thu Aug 17 10:05:25 2017
@@ -39,8 +39,9 @@ CHECK3-NEXT: 4 0
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
@@ -49,6 +50,8 @@ 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
More information about the llvm-commits
mailing list