[PATCH] D46090: [COFF] more informative "broken object file" diagnostics
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 15:36:17 PDT 2018
inglorion updated this revision to Diff 144025.
inglorion added a comment.
s/existant/existent/
https://reviews.llvm.org/D46090
Files:
lld/COFF/InputFiles.cpp
Index: lld/COFF/InputFiles.cpp
===================================================================
--- lld/COFF/InputFiles.cpp
+++ lld/COFF/InputFiles.cpp
@@ -326,14 +326,13 @@
if (SectionNumber == llvm::COFF::IMAGE_SYM_DEBUG)
return nullptr;
- // Reserved sections numbers don't have contents.
if (llvm::COFF::isReservedSectionNumber(SectionNumber))
- fatal("broken object file: " + toString(this));
+ fatal(toString(this) + ": " + Name +
+ " should not refer to special section " + Twine(SectionNumber));
- // This symbol references a section which is not present in the section
- // header.
if ((uint32_t)SectionNumber >= SparseChunks.size())
- fatal("broken object file: " + toString(this));
+ fatal(toString(this) + ": " + Name +
+ " should not refer to non-existent section " + Twine(SectionNumber));
// Handle comdat leader symbols.
if (const coff_aux_section_definition *Def = ComdatDefs[SectionNumber]) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46090.144025.patch
Type: text/x-patch
Size: 973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180425/99e6fea1/attachment.bin>
More information about the llvm-commits
mailing list