summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2012-11-02 19:45:23 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2012-11-02 19:45:23 +0000
commita307a1cf859f4a523951ac887d094039547adeb5 (patch)
tree3eb7c6c8a2559531782b30b20bea2408ce85cb8a /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
parentbb4c23ff49ba5f6b76793425278196b3fd0aef31 (diff)
downloadllvm-a307a1cf859f4a523951ac887d094039547adeb5.tar.gz
llvm-a307a1cf859f4a523951ac887d094039547adeb5.tar.bz2
llvm-a307a1cf859f4a523951ac887d094039547adeb5.tar.xz
Change resolveRelocation parameters so the relocations can find placeholder values in the original object buffer.
Some ELF relocations require adding the a value to the original contents of the object buffer at the specified location. In order to properly handle multiple applications of a relocation, the RuntimeDyld code should be grabbing the original value from the object buffer and writing a new value into the loaded section buffer. This patch changes the parameters passed to resolveRelocations to accommodate this need. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
index 3baec3cf2a..829fd6c4c9 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
@@ -272,16 +272,14 @@ protected:
void resolveRelocationEntry(const RelocationEntry &RE, uint64_t Value);
/// \brief A object file specific relocation resolver
- /// \param LocalAddress The address to apply the relocation action
- /// \param FinalAddress If the linker prepare code for remote executon then
- /// FinalAddress has the remote address to apply the
- /// relocation action, otherwise is same as LocalAddress
+ /// \param Section The section where the relocation is being applied
+ /// \param Offset The offset into the section for this relocation
/// \param Value Target symbol address to apply the relocation action
/// \param Type object file specific relocation type
/// \param Addend A constant addend used to compute the value to be stored
/// into the relocatable field
- virtual void resolveRelocation(uint8_t *LocalAddress,
- uint64_t FinalAddress,
+ virtual void resolveRelocation(const SectionEntry &Section,
+ uint64_t Offset,
uint64_t Value,
uint32_t Type,
int64_t Addend) = 0;