[PATCH] D55943: [RuntimeDyld] load all sections with ProcessAllSections

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 23:53:57 PST 2019


yonghong-song updated this revision to Diff 182215.
yonghong-song added a comment.

change one comment from C style to C++ style


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55943/new/

https://reviews.llvm.org/D55943

Files:
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp


Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
===================================================================
--- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -382,6 +382,25 @@
       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) {
+
+      // Ignore already loaded sections
+      if (LocalSections.find(*SI) != LocalSections.end())
+        continue;
+
+      bool IsCode = SI->isText();
+      if (auto SectionIDOrErr =
+              findOrEmitSection(Obj, *SI, IsCode, LocalSections))
+        LLVM_DEBUG(dbgs() << "\tSectionID: " << (*SectionIDOrErr) << "\n");
+      else
+        return SectionIDOrErr.takeError();
+    }
+  }
+
   // Give the subclasses a chance to tie-up any loose ends.
   if (auto Err = finalizeLoad(Obj, LocalSections))
     return std::move(Err);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55943.182215.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190117/bac19255/attachment.bin>


More information about the llvm-commits mailing list