[PATCH] Preliminary support for dynamically loadable coff objects

David Majnemer david.majnemer at gmail.com
Wed Feb 25 15:31:12 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp:132
@@ +131,3 @@
+      if (SecI == Obj.section_end())
+        llvm_unreachable("Symbol section not found, bad object file");
+      bool IsCode = SecI->isText();
----------------
Would `report_fatal_error` be more reasonable here?

================
Comment at: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp:141
@@ +140,3 @@
+  if (TargetOffset == UnknownAddressOrSize)
+    llvm_unreachable("External symbol reference?");
+
----------------
Likewise, would it be nicer to report an error in release builds as well?

================
Comment at: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp:145-146
@@ +144,4 @@
+  case COFF::IMAGE_REL_AMD64_ADDR64:
+  case COFF::IMAGE_REL_AMD64_ADDR32NB:
+  {
+    RelocationEntry RE(SectionID, Offset, RelType, TargetOffset + Addend);
----------------
Please stick this curly brace after the colon.

================
Comment at: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp:166
@@ +165,3 @@
+  for (const auto &SectionPair : SectionMap) {
+    const SectionRef& Section = SectionPair.first;
+    StringRef Name;
----------------
Please stick the ampersand next to the variable name.

http://reviews.llvm.org/D7793

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list