#[repr(C)]
pub struct Header {
Show 14 fields pub e_ident: [u8; 16], pub e_type: u16, pub e_machine: u16, pub e_version: u32, pub e_entry: u32, pub e_phoff: u32, pub e_shoff: u32, pub e_flags: u32, pub e_ehsize: u16, pub e_phentsize: u16, pub e_phnum: u16, pub e_shentsize: u16, pub e_shnum: u16, pub e_shstrndx: u16,
}

Fields

e_ident: [u8; 16]

Magic number and other info

e_type: u16

Object file type

e_machine: u16

Architecture

e_version: u32

Object file version

e_entry: u32

Entry point virtual address

e_phoff: u32

Program header table file offset

e_shoff: u32

Section header table file offset

e_flags: u32

Processor-specific flags

e_ehsize: u16

ELF header size in bytes

e_phentsize: u16

Program header table entry size

e_phnum: u16

Program header table entry count

e_shentsize: u16

Section header table entry size

e_shnum: u16

Section header table entry count

e_shstrndx: u16

Section header string table index

Implementations

Returns the corresponding ELF header from the given byte array.

Load a header from a file. You must ensure the seek is at the correct position.

Parses an ELF header from the given bytes

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

a Pwrite impl for Header: note we use the endianness value in the header, and not a parameter

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.