void RuntimeDyldMachO::finalizeLoad(ObjectImage &ObjImg, ObjSectionToIDMap &SectionMap) { unsigned EHFrameSID = RTDYLD_INVALID_SECTION_ID; unsigned TextSID = RTDYLD_INVALID_SECTION_ID; unsigned ExceptTabSID = RTDYLD_INVALID_SECTION_ID; ObjSectionToIDMap::iterator i, e; for (i = SectionMap.begin(), e = SectionMap.end(); i != e; ++i) { const SectionRef &Section = i->first; StringRef Name; Section.getName(Name); if (Name == "__eh_frame") EHFrameSID = i->second; else if (Name == "__text") TextSID = i->second; else if (Name == "__gcc_except_tab") ExceptTabSID = i->second; else if (Name == "__jump_table") populateJumpTable(cast<MachOObjectFile>(*ObjImg.getObjectFile()), Section, i->second); else if (Name == "__pointers") populatePointersSection(cast<MachOObjectFile>(*ObjImg.getObjectFile()), Section, i->second); } UnregisteredEHFrameSections.push_back( EHFrameRelatedSections(EHFrameSID, TextSID, ExceptTabSID)); }
void RuntimeDyldMachO::finalizeLoad(ObjSectionToIDMap &SectionMap) { unsigned EHFrameSID = RTDYLD_INVALID_SECTION_ID; unsigned TextSID = RTDYLD_INVALID_SECTION_ID; unsigned ExceptTabSID = RTDYLD_INVALID_SECTION_ID; ObjSectionToIDMap::iterator i, e; for (i = SectionMap.begin(), e = SectionMap.end(); i != e; ++i) { const SectionRef &Section = i->first; StringRef Name; Section.getName(Name); if (Name == "__eh_frame") EHFrameSID = i->second; else if (Name == "__text") TextSID = i->second; else if (Name == "__gcc_except_tab") ExceptTabSID = i->second; } UnregisteredEHFrameSections.push_back( EHFrameRelatedSections(EHFrameSID, TextSID, ExceptTabSID)); }