[lld] r243375 - COFF: Do not ignore /merge if /debug is specified.
Rui Ueyama
ruiu at google.com
Mon Jul 27 20:24:23 PDT 2015
Author: ruiu
Date: Mon Jul 27 22:24:23 2015
New Revision: 243375
URL: http://llvm.org/viewvc/llvm-project?rev=243375&view=rev
Log:
COFF: Do not ignore /merge if /debug is specified.
Previously, we ignore /merge option if /debug is specified
because I thought that was MSVC linker did. This was wrong.
/merge shouldn't be ignored even in debug mode.
Modified:
lld/trunk/COFF/Writer.cpp
lld/trunk/test/COFF/merge.test
Modified: lld/trunk/COFF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=243375&r1=243374&r2=243375&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.cpp (original)
+++ lld/trunk/COFF/Writer.cpp Mon Jul 27 22:24:23 2015
@@ -168,8 +168,6 @@ void Writer::dedupCOMDATs() {
static StringRef getOutputSection(StringRef Name) {
StringRef S = Name.split('$').first;
- if (Config->Debug)
- return S;
auto It = Config->Merge.find(S);
if (It == Config->Merge.end())
return S;
Modified: lld/trunk/test/COFF/merge.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/merge.test?rev=243375&r1=243374&r2=243375&view=diff
==============================================================================
--- lld/trunk/test/COFF/merge.test (original)
+++ lld/trunk/test/COFF/merge.test Mon Jul 27 22:24:23 2015
@@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld -flavor link2 /out:%t.exe /entry:main /subsystem:console /force \
-# RUN: /merge:.foo=.abc /merge:.bar=.def %t.obj
+# RUN: /merge:.foo=.abc /merge:.bar=.def %t.obj /debug
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
# CHECK: Name: .def
More information about the llvm-commits
mailing list