pub struct Header<'a> { /* private fields */ }
Expand description
Class which represents the ELF’s header. This class mirrors the raw
ELF Elfxx_Ehdr
structure
Implementations§
§impl Header<'_>
impl Header<'_>
pub fn entrypoint(&self) -> u64
pub fn entrypoint(&self) -> u64
Executable entrypoint
pub fn object_file_version(&self) -> Version
pub fn object_file_version(&self) -> Version
Version of the object file format
pub fn identity_class(&self) -> Class
pub fn identity_class(&self) -> Class
Return the object’s class. ELF64
or ELF32
pub fn identity_data(&self) -> ElfData
pub fn identity_data(&self) -> ElfData
Specify the data encoding
pub fn identity_version(&self) -> Version
pub fn identity_version(&self) -> Version
pub fn identity_os_abi(&self) -> OsAbi
pub fn identity_os_abi(&self) -> OsAbi
Identifies the version of the ABI for which the object is prepared
pub fn machine_type(&self) -> u32
pub fn machine_type(&self) -> u32
Target architecture
pub fn program_headers_offset(&self) -> u64
pub fn program_headers_offset(&self) -> u64
Offset of the programs table (also known as segments table)
pub fn section_headers_offset(&self) -> u64
pub fn section_headers_offset(&self) -> u64
Offset of the sections table
pub fn processor_flag(&self) -> u32
pub fn processor_flag(&self) -> u32
Processor-specific flags
pub fn header_size(&self) -> u32
pub fn header_size(&self) -> u32
Size of the current header (i.e. sizeof(Elfxx_Ehdr)
)
This size should be 64 for an ELF64
binary and 52 for an ELF32
.
pub fn program_header_size(&self) -> u32
pub fn program_header_size(&self) -> u32
Return the size of a program header (i.e. sizeof(Elfxx_Phdr)
)
This size should be 56 for an ELF64
binary and 32 for an ELF32
.
pub fn numberof_segments(&self) -> u32
pub fn numberof_segments(&self) -> u32
Return the the number of segments
pub fn section_header_size(&self) -> u32
pub fn section_header_size(&self) -> u32
Return the size of a section header (i.e. sizeof(Elfxx_Shdr)
)
This size should be 64 for a ELF64
binary and 40 for an ELF32
.
pub fn numberof_sections(&self) -> u32
pub fn numberof_sections(&self) -> u32
Return the number of sections
pub fn section_name_table_idx(&self) -> u32
pub fn section_name_table_idx(&self) -> u32
Return the section’s index which contains sections’ names