class EIdent(ElfStruct): PROPERTIES = ( ESP('ei_magic', EIMagic), ESP('ei_class', EIClass), ESP('ei_data', EIData), ESP('ei_version', EIVersion), ESP('ei_osabi', EIOSAbi), ESP('ei_abiversion', EIAbiVersion), ESP('ei_pad', EIPad) )
class ElfSectionHeader(ElfStruct): PROPERTIES = ( ESP('sh_name', SHName), ESP('sh_type', SHType), ESP('sh_flags', SHFlags), ESP('sh_addr', SHAddr), ESP('sh_offset', SHOffset), ESP('sh_size', SHSize), ESP('sh_link', SHLink), ESP('sh_info', SHInfo), ESP('sh_addralign', SHAddrAlign), ESP('sh_entsize', SHEntSize), ) @property def section(self) -> ElfSection: return construct_elf_section(self) def __lt__(self, other): assert isinstance(other, ElfSectionHeader) return self.sh_name < other.sh_name
class ElfSymbol64(ElfStruct, ElfSymbolCommon): PROPERTIES = ( ESP('st_name', STName), ESP('st_info', STInfo), ESP('st_other', STOther), ESP('st_shndx', STShndx), ESP('st_value', ElfInt64Type), ESP('st_size', ElfInt64Type), )
class ELFHeader(ElfStruct): PROPERTIES = (ESP('e_ident', EIdent), ESP('e_type', EType), ESP('e_machine', EMachine), ESP('e_version', EVersion), ESP('e_entry', ElfIntNType), ESP('e_phoff', ElfIntNType), ESP('e_shoff', ElfIntNType), ESP('e_flags', ElfInt32Type), ESP('e_ehsize', ElfInt16Type), ESP('e_phentsize', ElfInt16Type), ESP('e_phnum', ElfInt16Type), ESP('e_shentsize', ElfInt16Type), ESP('e_shnum', ElfInt16Type), ESP('e_shstrndx', ElfInt16Type))
class ElfProgramHeader32(ElfStruct): PROPERTIES = (ESP('p_type', PType), ESP('p_offset', ElfInt32Type), ESP('p_vaddr', ElfInt32Type), ESP('p_paddr', ElfInt32Type), ESP('p_filesz', ElfInt32Type), ESP('p_memsz', ElfInt32Type), ESP('p_flags', PFlags), ESP('p_align', ElfInt32Type))