Adding multiple object support to MCJIT EH frame handling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192504 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Kaylor
2013-10-11 21:25:48 +00:00
parent b19b474de9
commit 528f6d787b
15 changed files with 210 additions and 88 deletions

View File

@ -54,10 +54,15 @@ static const char *processFDE(const char *Entry) {
}
#endif
void RTDyldMemoryManager::registerEHFrames(StringRef SectionData) {
// This implementation handles frame registration for local targets.
// Memory managers for remote targets should re-implement this function
// and use the LoadAddr parameter.
void RTDyldMemoryManager::registerEHFrames(uint8_t *Addr,
uint64_t LoadAddr,
size_t Size) {
#if HAVE_EHTABLE_SUPPORT
const char *P = SectionData.data();
const char *End = SectionData.data() + SectionData.size();
const char *P = (const char *)Addr;
const char *End = P + Size;
do {
P = processFDE(P);
} while(P != End);