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. llvm-svn: 243364
This commit is contained in:
parent
35959592a3
commit
2832ce95a5
|
@ -145,6 +145,10 @@ std::error_code ObjectFile::initializeChunks() {
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue