Struct object::build::elf::Header

source ·
pub struct Header {
    pub os_abi: u8,
    pub abi_version: u8,
    pub e_type: u16,
    pub e_machine: u16,
    pub e_entry: u64,
    pub e_flags: u32,
    pub e_phoff: u64,
}
Expand description

ELF file header.

This corresponds to fields in elf::FileHeader32 or elf::FileHeader64. This only contains the ELF file header fields that can be modified. The other fields are automatically calculated.

Fields§

§os_abi: u8

The OS ABI field in the file header.

One of the ELFOSABI* constants.

§abi_version: u8

The ABI version field in the file header.

The meaning of this field depends on the os_abi value.

§e_type: u16

The object file type in the file header.

One of the ET_* constants.

§e_machine: u16

The architecture in the file header.

One of the EM_* constants.

§e_entry: u64

Entry point virtual address in the file header.

§e_flags: u32

The processor-specific flags in the file header.

A combination of the EF_* constants.

§e_phoff: u64

The file offset of the program header table.

Writing will fail if the program header table cannot be placed at this offset.

Trait Implementations§

source§

impl Debug for Header

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Header

source§

fn default() -> Header

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

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.