summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-16 23:50:55 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-16 23:50:55 +0000
commit0ddb3a4963996bbb6bace4c2af71d9e3094d7c16 (patch)
tree6571c95881461014160105a93f1e5b27414d2e82 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parent9df6cc8f4f9005012ead32fa0be0e8a9c8089508 (diff)
downloadbcm5719-llvm-0ddb3a4963996bbb6bace4c2af71d9e3094d7c16.tar.gz
bcm5719-llvm-0ddb3a4963996bbb6bace4c2af71d9e3094d7c16.zip
ExecutionEngine interface to re-map addresses for engines that support it.
llvm-svn: 148264
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 18827978d9a..99524a3b002 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -54,6 +54,14 @@ void RuntimeDyldImpl::resolveRelocations() {
}
}
+void RuntimeDyldImpl::mapSectionAddress(void *LocalAddress,
+ uint64_t TargetAddress) {
+ assert(SectionLocalMemToID.count(LocalAddress) &&
+ "Attempting to remap address of unknown section!");
+ unsigned SectionID = SectionLocalMemToID[LocalAddress];
+ reassignSectionAddress(SectionID, TargetAddress);
+}
+
//===----------------------------------------------------------------------===//
// RuntimeDyld class implementation
RuntimeDyld::RuntimeDyld(RTDyldMemoryManager *mm) {
@@ -116,6 +124,11 @@ void RuntimeDyld::reassignSectionAddress(unsigned SectionID,
Dyld->reassignSectionAddress(SectionID, Addr);
}
+void RuntimeDyld::mapSectionAddress(void *LocalAddress,
+ uint64_t TargetAddress) {
+ Dyld->mapSectionAddress(LocalAddress, TargetAddress);
+}
+
StringRef RuntimeDyld::getErrorString() {
return Dyld->getErrorString();
}
OpenPOWER on IntegriCloud