[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 16:37:53 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330883: [COFF] more informative "broken object file" diagnostics (authored by inglorion, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46090?vs=144025&id=144036#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46090
Files:
lld/trunk/COFF/InputFiles.cpp
Index: lld/trunk/COFF/InputFiles.cpp
===================================================================
--- lld/trunk/COFF/InputFiles.cpp
+++ lld/trunk/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.144036.patch
Type: text/x-patch
Size: 991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180425/3e850b25/attachment.bin>
More information about the llvm-commits
mailing list