summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-03-07 23:05:25 +0000
committerSean Callanan <scallanan@apple.com>2012-03-07 23:05:25 +0000
commit61dfa77fce2b6b6261e43334aec060129eac5c6c (patch)
tree6446368a280009accf9ff899218cc08c8f4c8d02 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
parent7afcda0c582f57a46de32e88ad6c6d5b25d513ce (diff)
downloadllvm-61dfa77fce2b6b6261e43334aec060129eac5c6c.tar.gz
llvm-61dfa77fce2b6b6261e43334aec060129eac5c6c.tar.bz2
llvm-61dfa77fce2b6b6261e43334aec060129eac5c6c.tar.xz
Improved support in RuntimeDyldMachO for generating
code that will be relocated into another memory space. Now when relocations are resolved, the address of the relocation in the host memory (where the JIT is) is passed separately from the address that the relocation will be at in the target memory (where the code will run). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
index 57989811c8..09803cff74 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
@@ -51,12 +51,27 @@ class RuntimeDyldMachO : public RuntimeDyldImpl {
// relocations by definition. Indexed by symbol name.
StringMap<RelocationList> UnresolvedRelocations;
- bool resolveRelocation(uint8_t *Address, uint64_t Value, bool isPCRel,
- unsigned Type, unsigned Size, int64_t Addend);
- bool resolveX86_64Relocation(uintptr_t Address, uintptr_t Value, bool isPCRel,
- unsigned Type, unsigned Size, int64_t Addend);
- bool resolveARMRelocation(uintptr_t Address, uintptr_t Value, bool isPCRel,
- unsigned Type, unsigned Size, int64_t Addend);
+ bool resolveRelocation(uint8_t *LocalAddress,
+ uint64_t FinalAddress,
+ uint64_t Value,
+ bool isPCRel,
+ unsigned Type,
+ unsigned Size,
+ int64_t Addend);
+ bool resolveX86_64Relocation(uint8_t *LocalAddress,
+ uint64_t FinalAddress,
+ uint64_t Value,
+ bool isPCRel,
+ unsigned Type,
+ unsigned Size,
+ int64_t Addend);
+ bool resolveARMRelocation(uint8_t *LocalAddress,
+ uint64_t FinalAddress,
+ uint64_t Value,
+ bool isPCRel,
+ unsigned Type,
+ unsigned Size,
+ int64_t Addend);
bool loadSegment32(const MachOObject *Obj,
const MachOObject::LoadCommandInfo *SegmentLCI,