/** Destructor for class ElfImports to release allocated memory @internalComponent @released */ ElfImports::~ElfImports() { if(iImports.size()) { ImportMap::iterator aItr = iImports.begin(); ImportMap::iterator last = iImports.end(); RelocationList *rlistTemp; while( aItr != last) { rlistTemp = &((*aItr).second); RelocationList::iterator aItr1 = rlistTemp->begin(); RelocationList::iterator last1 = rlistTemp->end(); ElfImportRelocation *temp; while( aItr1 != last1) { temp = *aItr1; aItr1++; delete temp; } aItr++; rlistTemp->clear(); } } iImports.clear(); }
/** Function to get import size @return import size @internalComponent @released */ PLUINT32 ElfImports::GetImportSize(){ PLUINT32 aSize = 0; ImportMap::iterator aItr = iImports.begin(); RelocationList aList; while(aItr != iImports.end()) { aList = ((*aItr).second); aSize += aList.size(); aItr++; } return aSize; }
void RuntimeDyldImpl::resolveRelocationList(const RelocationList &Relocs, uint64_t Value) { for (unsigned i = 0, e = Relocs.size(); i != e; ++i) { const RelocationEntry &RE = Relocs[i]; // Ignore relocations for sections that were not loaded if (Sections[RE.SectionID].Address == 0) continue; resolveRelocation(RE, Value); } }
void RuntimeDyldImpl::resolveRelocationList(const RelocationList &Relocs, uint64_t Value) { for (unsigned i = 0, e = Relocs.size(); i != e; ++i) { resolveRelocationEntry(Relocs[i], Value); } }