Fix incorrect call of resolveRelocation() for ARM ELF stub relocations.
authorDanil Malyshev <dmalyshev@accesssoftek.com>
Tue, 17 Apr 2012 20:10:16 +0000 (20:10 +0000)
committerDanil Malyshev <dmalyshev@accesssoftek.com>
Tue, 17 Apr 2012 20:10:16 +0000 (20:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154948 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

index e2ebc342adbbbd715a6c5abe621135f459bcfd3c..db6da8c8ef256d8cd901f03fdff04dc82bb6c071 100644 (file)
@@ -401,7 +401,7 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,
     //  Look up for existing stub.
     StubMap::const_iterator i = Stubs.find(Value);
     if (i != Stubs.end()) {
-      resolveRelocation(Target, Section.LoadAddress, (uint64_t)Section.Address +
+      resolveRelocation(Target, (uint64_t)Target, (uint64_t)Section.Address +
                         i->second, RelType, 0);
       DEBUG(dbgs() << " Stub function found\n");
     } else {
@@ -412,7 +412,7 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,
                                                    Section.StubOffset);
       AddRelocation(Value, Rel.SectionID,
                     StubTargetAddr - Section.Address, ELF::R_ARM_ABS32);
-      resolveRelocation(Target, Section.LoadAddress, (uint64_t)Section.Address +
+      resolveRelocation(Target, (uint64_t)Target, (uint64_t)Section.Address +
                         Section.StubOffset, RelType, 0);
       Section.StubOffset += getMaxStubSize();
     }