From: Rui Ueyama Date: Wed, 21 May 2014 19:44:08 +0000 (+0000) Subject: [PECOFF] Check for a Characteristics field of a .debug section. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f4674c828c413dd5e481713ebcc0b90b80a94f8;p=platform%2Fupstream%2Fllvm.git [PECOFF] Check for a Characteristics field of a .debug section. llvm-svn: 209317 --- diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp index ae3d2f6..5bca2ea 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp @@ -619,8 +619,10 @@ FileCOFF::AtomizeDefinedSymbolsInSection(const coff_section *section, // .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);