[llvm] r216418 - [MCJIT][SystemZ] Use a simpler expression for indirect relocation offsets.

Lang Hames lhames at gmail.com
Mon Aug 25 16:33:48 PDT 2014


Author: lhames
Date: Mon Aug 25 18:33:48 2014
New Revision: 216418

URL: http://llvm.org/viewvc/llvm-project?rev=216418&view=rev
Log:
[MCJIT][SystemZ] Use a simpler expression for indirect relocation offsets.

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.




Modified:
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=216418&r1=216417&r2=216418&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Mon Aug 25 18:33:48 2014
@@ -1317,7 +1317,7 @@ relocation_iterator RuntimeDyldELF::proc
       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





More information about the llvm-commits mailing list