diff options
Diffstat (limited to 'lld/COFF/Writer.cpp')
-rw-r--r-- | lld/COFF/Writer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index fb8005b25607..81a9b2425527 100644 --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -203,15 +203,16 @@ void Writer::createImportTables() { Sec->addChunk(C); } if (!DelayIdata.empty()) { + DelayIdata.create(Symtab->find("__delayLoadHelper2")); OutputSection *Sec = createSection(".didat"); - for (Chunk *C : DelayIdata.getChunks(Symtab->find("__delayLoadHelper2"))) + for (Chunk *C : DelayIdata.getChunks()) + Sec->addChunk(C); + Sec = createSection(".data"); + for (Chunk *C : DelayIdata.getDataChunks()) Sec->addChunk(C); Sec = createSection(".text"); for (std::unique_ptr<Chunk> &C : DelayIdata.getCodeChunks()) Sec->addChunk(C.get()); - Sec = createSection(".data"); - for (std::unique_ptr<Chunk> &C : DelayIdata.getDataChunks()) - Sec->addChunk(C.get()); } } |