ExecutionEngine interface to re-map addresses for engines that support it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index a3b4919..1cc021a 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -172,6 +172,7 @@
 
     // Remember what got allocated for this SectionID.
     Sections.push_back(sys::MemoryBlock(Buffer, Sect->Size));
+    SectionLocalMemToID[Buffer] = SectionID;
 
     // By default, the load address of a section is its memory buffer.
     SectionLoadAddress.push_back((uint64_t)Buffer);
@@ -291,6 +292,7 @@
 
     // Remember what got allocated for this SectionID.
     Sections.push_back(sys::MemoryBlock(Buffer, Sect->Size));
+    SectionLocalMemToID[Buffer] = SectionID;
 
     // By default, the load address of a section is its memory buffer.
     SectionLoadAddress.push_back((uint64_t)Buffer);