[][src]Struct goblin::pe::header::CoffHeader

#[repr(C)]
pub struct CoffHeader {
    pub machine: u16,
    pub number_of_sections: u16,
    pub time_date_stamp: u32,
    pub pointer_to_symbol_table: u32,
    pub number_of_symbol_table: u32,
    pub size_of_optional_header: u16,
    pub characteristics: u16,
}

COFF Header

Fields

machine: u16

The machine type

number_of_sections: u16time_date_stamp: u32pointer_to_symbol_table: u32number_of_symbol_table: u32size_of_optional_header: u16characteristics: u16

Methods

impl CoffHeader[src]

pub fn parse(bytes: &[u8], offset: &mut usize) -> Result<Self>[src]

pub fn sections(
    &self,
    bytes: &[u8],
    offset: &mut usize
) -> Result<Vec<SectionTable>>
[src]

Parse the COFF section headers.

For COFF, these immediately follow the COFF header. For PE, these immediately follow the optional header.

pub fn symbols<'a>(&self, bytes: &'a [u8]) -> Result<SymbolTable<'a>>[src]

Return the COFF symbol table.

pub fn strings<'a>(&self, bytes: &'a [u8]) -> Result<Strtab<'a>>[src]

Return the COFF string table.

Trait Implementations

impl PartialEq<CoffHeader> for CoffHeader[src]

impl Copy for CoffHeader[src]

impl Default for CoffHeader[src]

impl Clone for CoffHeader[src]

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

Performs copy-assignment from source. Read more

impl Debug for CoffHeader[src]

impl FromCtx<Endian, [u8]> for CoffHeader[src]

impl<'a> TryFromCtx<'a, Endian, [u8]> for CoffHeader where
    CoffHeader: 'a, 
[src]

type Error = Error

type Size = usize

impl<'a> IntoCtx<Endian, [u8]> for &'a CoffHeader[src]

impl IntoCtx<Endian, [u8]> for CoffHeader[src]

impl<'a> TryIntoCtx<Endian, [u8]> for &'a CoffHeader[src]

type Error = Error

type Size = usize

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

type Error = Error

type Size = usize

impl SizeWith<Endian> for CoffHeader[src]

type Units = usize

Auto Trait Implementations

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]