Change resolveRelocation parameters so the relocations can find placeholder values...
[oota-llvm.git] / lib / ExecutionEngine / RuntimeDyld / RuntimeDyld.cpp
index 141836fc417c3b2595a75cb82a08402253c118c2..950b4208a9fb0f9a56d1805bf16aee3d4f0db8ef 100644 (file)
@@ -404,14 +404,14 @@ void RuntimeDyldImpl::resolveRelocationEntry(const RelocationEntry &RE,
                                              uint64_t Value) {
   // Ignore relocations for sections that were not loaded
   if (Sections[RE.SectionID].Address != 0) {
-    uint8_t *Target = Sections[RE.SectionID].Address + RE.Offset;
     DEBUG(dbgs() << "\tSectionID: " << RE.SectionID
-          << " + " << RE.Offset << " (" << format("%p", Target) << ")"
+          << " + " << RE.Offset << " ("
+          << format("%p", Sections[RE.SectionID].Address + RE.Offset) << ")"
           << " RelType: " << RE.RelType
           << " Addend: " << RE.Addend
           << "\n");
 
-    resolveRelocation(Target, Sections[RE.SectionID].LoadAddress + RE.Offset,
+    resolveRelocation(Sections[RE.SectionID], RE.Offset,
                       Value, RE.RelType, RE.Addend);
   }
 }