diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 413fa3856a1426..02394cbae95d55 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -435,10 +435,7 @@ void InputSection::copyRelocations(uint8_t *buf, continue; } SectionBase *section = d->section; - if (!section->isLive()) { - p->setSymbolAndType(0, 0, false); - continue; - } + assert(section->isLive()); int64_t addend = rel.addend; const uint8_t *bufLoc = sec->content().begin() + rel.offset;