[lld] r209317 - [PECOFF] Check for a Characteristics field of a .debug section.
Rui Ueyama
ruiu at google.com
Wed May 21 12:44:08 PDT 2014
Author: ruiu
Date: Wed May 21 14:44:08 2014
New Revision: 209317
URL: http://llvm.org/viewvc/llvm-project?rev=209317&view=rev
Log:
[PECOFF] Check for a Characteristics field of a .debug section.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=209317&r1=209316&r2=209317&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Wed May 21 14:44:08 2014
@@ -619,8 +619,10 @@ FileCOFF::AtomizeDefinedSymbolsInSection
// .debug sections. We don't support it yet. Let's discard .debug sections at
// the very beginning of the process so that we don't spend time on linking
// blobs that nobody would understand.
- if (sectionName == ".debug" || sectionName.startswith(".debug$"))
+ if ((section->Characteristics & llvm::COFF::IMAGE_SCN_MEM_DISCARDABLE) &&
+ (sectionName == ".debug" || sectionName.startswith(".debug$"))) {
return error_code::success();
+ }
DefinedAtom::ContentType type = getContentType(section);
DefinedAtom::ContentPermissions perms = getPermissions(section);
More information about the llvm-commits
mailing list