[MCJIT][SystemZ] Use a simpler expression for indirect relocation offsets.
authorLang Hames <lhames@gmail.com>
Mon, 25 Aug 2014 23:33:48 +0000 (23:33 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 25 Aug 2014 23:33:48 +0000 (23:33 +0000)
The expressions 'Reloc.Addend - Addend' and 'Reloc.Offset' should always be
equal in this context. The latter is prefered - we want to remove the
RelocationValueRef::Addend field in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216418 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

index b3c94b3..9aa0411 100644 (file)
@@ -1317,7 +1317,7 @@ relocation_iterator RuntimeDyldELF::processRelocationRef(
       Stubs[Value] = StubOffset;
       createStubFunction((uint8_t *)StubAddress);
       RelocationEntry RE(SectionID, StubOffset + 8, ELF::R_390_64,
-                         Value.Addend - Addend);
+                         Value.Offset);
       if (Value.SymbolName)
         addRelocationForSymbol(RE, Value.SymbolName);
       else