pub struct Header {Show 16 fields
pub class: Class,
pub byte_order: ByteOrder,
pub os_abi: OsAbi,
pub abi_version: u8,
pub kind: FileKind,
pub machine: Machine,
pub flags: u32,
pub entry_point: u64,
pub program_header_offset: u64,
pub segment_len: u16,
pub num_segments: u16,
pub section_header_offset: u64,
pub section_len: u16,
pub num_sections: u16,
pub section_names_index: u16,
pub len: u16,
}Expand description
ELF header.
Fields§
§class: ClassBitness.
byte_order: ByteOrderData format.
os_abi: OsAbiOperating system ABI.
abi_version: u8ABI version
kind: FileKindFile type.
machine: MachineArchitecture.
flags: u32Architecture-specific flags.
Use ArmFlags to query ARM-specific flags.
entry_point: u64Program entry point.
program_header_offset: u64Program header (the list of segments) offset within the file.
segment_len: u16The length of each segment’s metadata entry.
num_segments: u16The number of segments.
section_header_offset: u64Section header (the list of sections) offset within the file.
section_len: u16The length of each section’s metadata entry.
num_sections: u16The number of sections.
section_names_index: u16The index of the section in the section header that stores the names of sections.
len: u16The length of the ELF header.
Implementations§
Source§impl Header
impl Header
Sourcepub fn write<W: ElfWrite>(&self, writer: &mut W) -> Result<(), Error>
pub fn write<W: ElfWrite>(&self, writer: &mut W) -> Result<(), Error>
Write header to writer.
The header is validated before writing.
Sourcepub const fn program_header_len(&self) -> u64
pub const fn program_header_len(&self) -> u64
The size in bytes of the program header (the list of segments).
Sourcepub const fn section_header_len(&self) -> u64
pub const fn section_header_len(&self) -> u64
The size in bytes of the section header (the list of sections).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more