def _read_sections_info(self) -> Dict[str, mi.SectionInfo]: self.file.seek(0) self.file.seek(read_uint(self.file, 8)) tags = {} for _ in range(read_varuint(self.file)): name = read_string(self.file, plain=True) offset = read_varuint(self.file) length = read_varuint(self.file) tags[name] = mi.SectionInfo(name=name, offset=offset, size=length) return tags
def sections_info(self) -> Dict[str, mi.SectionInfo]: si = self.mwm.sections_info() return { k: mi.SectionInfo(name=v.tag, offset=v.offset, size=v.size) for k, v in si.items() }