diff options
Diffstat (limited to 'COFF/MarkLive.cpp')
| -rw-r--r-- | COFF/MarkLive.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/COFF/MarkLive.cpp b/COFF/MarkLive.cpp index 25e5cc350673..a2756e5c89e0 100644 --- a/COFF/MarkLive.cpp +++ b/COFF/MarkLive.cpp @@ -52,6 +52,13 @@ void markLive(const std::vector<Chunk *> &Chunks) { while (!Worklist.empty()) { SectionChunk *SC = Worklist.pop_back_val(); + + // If this section was discarded, there are relocations referring to + // discarded sections. Ignore these sections to avoid crashing. They will be + // diagnosed during relocation processing. + if (SC->isDiscarded()) + continue; + assert(SC->isLive() && "We mark as live when pushing onto the worklist!"); // Mark all symbols listed in the relocation table for this section. |
