[lld] r243364 - COFF: Skip non-DWARF debug info sections.
Rui Ueyama
ruiu at google.com
Mon Jul 27 18:06:58 PDT 2015
Author: ruiu
Date: Mon Jul 27 20:06:58 2015
New Revision: 243364
URL: http://llvm.org/viewvc/llvm-project?rev=243364&view=rev
Log:
COFF: Skip non-DWARF debug info sections.
Leaving them in an executable is basically harmless but wastes disk space.
Because no one is using non-DWARF debug info linked by LLD, we can just
remove them.
Modified:
lld/trunk/COFF/InputFiles.cpp
Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=243364&r1=243363&r2=243364&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Mon Jul 27 20:06:58 2015
@@ -145,6 +145,10 @@ std::error_code ObjectFile::initializeCh
Directives = std::string((const char *)Data.data(), Data.size());
continue;
}
+ // Skip non-DWARF debug info. MSVC linker converts the sections into
+ // a PDB file, but we don't support that.
+ if (Name == ".debug" || Name.startswith(".debug$"))
+ continue;
// We want to preserve DWARF debug sections only when /debug is on.
if (!Config->Debug && Name.startswith(".debug"))
continue;
More information about the llvm-commits
mailing list