diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 9179d197e7fa..781d9728dee3 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -1064,13 +1064,8 @@ template void OutputSection::writeTo(uint8_t *Buf) { ArrayRef Filler = Script::X->getFiller(this->Name); if (!Filler.empty()) fill(Buf, this->getSize(), Filler); - if (Config->Threads) { - parallel_for_each(Sections.begin(), Sections.end(), - [=](InputSection *C) { C->writeTo(Buf); }); - } else { - for (InputSection *C : Sections) - C->writeTo(Buf); - } + parallel_for_each(Sections.begin(), Sections.end(), + [=](InputSection *C) { C->writeTo(Buf); }); // Linker scripts may have BYTE()-family commands with which you // can write arbitrary bytes to the output. Process them if any. Script::X->writeDataBytes(this->Name, Buf);