Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp =================================================================== --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -382,6 +382,29 @@ Checker->registerStubMap(Obj.getFileName(), SectionID, Stubs); } + // Process remaining sections + if (ProcessAllSections) { + LLVM_DEBUG(dbgs() << "Process remaining sections:\n"); + for (section_iterator SI = Obj.section_begin(), SE = Obj.section_end(); + SI != SE; ++SI) { + section_iterator RelocatedSection = SI->getRelocatedSection(); + + // Ignore relocation sections + if (RelocatedSection != SE) + continue; + + bool IsCode = SI->isText(); + unsigned SectionID = 0; + if (auto SectionIDOrErr = findOrEmitSection(Obj, *SI, IsCode, + LocalSections)) + SectionID = *SectionIDOrErr; + else + return SectionIDOrErr.takeError(); + + LLVM_DEBUG(dbgs() << "\tSectionID: " << SectionID << "\n"); + } + } + // Give the subclasses a chance to tie-up any loose ends. if (auto Err = finalizeLoad(Obj, LocalSections)) return std::move(Err);