#[repr(C)]
pub struct Header {
Show 14 fields pub ident: [u8; 16], pub ty: FileType, pub machine: Machine, pub version: u32, pub entry: Address, pub ph_offset: Offset, pub sh_offset: Offset, pub flags: u32, pub header_size: u16, pub ph_entry_size: u16, pub ph_count: u16, pub sh_entry_size: u16, pub sh_count: u16, pub section_name_table: u16,
}

Fields

ident: [u8; 16]ty: FileTypemachine: Machineversion: u32entry: Addressph_offset: Offsetsh_offset: Offsetflags: u32header_size: u16ph_entry_size: u16ph_count: u16sh_entry_size: u16sh_count: u16section_name_table: u16

Implementations

Like Header::new but takes a byte slice and checks the alignment.

Coerce a byte slice into an ELF header.

Safety

It is undefined behaviour for elf to have a smaller alignment than Header.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.