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

#[repr(C)]
pub struct Header { 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

Methods

impl Header[src]

pub fn from_bytes(bytes: &[u8; 52]) -> &Header[src]

Returns the corresponding ELF header from the given byte array.

impl Header[src]

pub fn from_fd(bytes: &mut File) -> Result<Header>[src]

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

pub fn parse(bytes: &[u8]) -> Result<Header>[src]

Parses an ELF header from the given bytes

Trait Implementations

impl Clone for Header[src]

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

Performs copy-assignment from source. Read more

impl Copy for Header[src]

impl PartialEq<Header> for Header[src]

impl Default for Header[src]

impl From<Header> for Header[src]

impl From<Header> for ElfHeader[src]

impl Debug for Header[src]

impl Plain for Header[src]

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

type Error = Error

type Size = usize

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

type Error = Error

type Size = usize

fn try_into_ctx(
    self,
    bytes: &mut [u8],
    _endianness: Endian
) -> Result<Self::Size, Self::Error>
[src]

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

Auto Trait Implementations

impl Send for Header

impl Sync for Header

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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