DFsSection *DFsScript::FindSectionEnd(const char *brace) { int n; // hash table is no use, they are hashed according to // the offset of the starting brace // we have to go through every entry to find from the // ending brace for(n=0; n<SECTIONSLOTS; n++) // check all sections in all chains { DFsSection *current = sections[n]; while(current) { if(SectionEnd(current) == brace) return current; // found it current = current->next; } } return NULL; // not found }
SectionDisassembler::SectionDisassembler(Common::Allocator& allocator, uint32_t sectionNumber, const InstantiableSection& section) : allocator(allocator), section(section) { disasm.reset(new Disassembler(allocator, SectionBegin(section), SectionEnd(section))); this->sectionNumber = sectionNumber; }
void ObjFile::ResolveSymbols(ObjFactory *Factory) { for (SectionIterator it = SectionBegin(); it != SectionEnd(); ++it) (*it)->ResolveSymbols(Factory); }