[][src]Struct goblin::elf::header::Header

pub struct Header {
    pub e_ident: [u8; 16],
    pub e_type: u16,
    pub e_machine: u16,
    pub e_version: u32,
    pub e_entry: u64,
    pub e_phoff: u64,
    pub e_shoff: u64,
    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,
}

An ELF header

Fields

e_ident: [u8; 16]e_type: u16e_machine: u16e_version: u32e_entry: u64e_phoff: u64e_shoff: u64e_flags: u32e_ehsize: u16e_phentsize: u16e_phnum: u16e_shentsize: u16e_shnum: u16e_shstrndx: u16

Methods

impl Header[src]

pub fn size(ctx: Ctx) -> usize[src]

Return the size of the underlying program header, given a container

pub fn container(&self) -> Result<Container>[src]

Returns the container type this header specifies

pub fn endianness(&self) -> Result<Endian>[src]

Returns the byte order this header specifies

pub fn new(ctx: Ctx) -> Self[src]

Trait Implementations

impl PartialEq<Header> for Header[src]

impl Copy for Header[src]

impl From<Header> for Header[src]

impl From<Header> for ElfHeader[src]

impl From<Header> for Header[src]

impl From<Header> for ElfHeader[src]

impl Clone for Header[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Header[src]

impl<'a> TryFromCtx<'a, Endian, [u8]> for Header[src]

type Error = Error

type Size = usize

impl IntoCtx<Ctx, [u8]> for Header[src]

impl TryIntoCtx<Endian, [u8]> for Header[src]

type Error = Error

type Size = usize

impl SizeWith<Ctx> for Header[src]

type Units = usize

Auto Trait Implementations

impl Send for Header

impl Unpin for Header

impl Sync for Header

impl UnwindSafe for Header

impl RefUnwindSafe for Header

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]