Struct Header

Source
#[repr(C)]
pub struct Header {
Show 19 fields pub magic: [u8; 4], pub class: u8, pub data: u8, pub header_version: u8, pub abi: u8, pub abi_version: u8, pub file_type: u16, pub machine_type: u16, pub version: u32, pub entry_point: u64, pub program_header_offset: u64, pub section_header_offset: u64, pub flags: u32, pub header_size: u16, pub program_header_entry_size: u16, pub number_of_program_headers: u16, pub section_header_entry_size: u16, pub number_of_section_headers: u16, pub string_table_index: u16, /* private fields */
}
Expand description

The ELF header

Fields§

§magic: [u8; 4]§class: u8§data: u8§header_version: u8§abi: u8§abi_version: u8§file_type: u16§machine_type: u16§version: u32§entry_point: u64§program_header_offset: u64§section_header_offset: u64§flags: u32§header_size: u16§program_header_entry_size: u16§number_of_program_headers: u16§section_header_entry_size: u16§number_of_section_headers: u16§string_table_index: u16

This is the section index of the string table that contains the names of the sections.

Implementations§

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
Source§

impl<'a> TryFromCtx<'a, Endian> for Header
where Header: 'a,

Source§

type Error = Error

Source§

fn try_from_ctx( src: &'a [u8], ctx: Endian, ) -> Result<(Self, usize), Self::Error>

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>,

Source§

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>,

Source§

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.