Struct goblin::pe::header::CoffHeader
source · #[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,
}
Expand description
COFF Header
Fields§
§machine: u16
The machine type
number_of_sections: u16
§time_date_stamp: u32
§pointer_to_symbol_table: u32
§number_of_symbol_table: u32
§size_of_optional_header: u16
§characteristics: u16
Implementations§
source§impl CoffHeader
impl CoffHeader
pub fn parse(bytes: &[u8], offset: &mut usize) -> Result<Self>
sourcepub fn sections(
&self,
bytes: &[u8],
offset: &mut usize
) -> Result<Vec<SectionTable>>
pub fn sections( &self, bytes: &[u8], offset: &mut usize ) -> Result<Vec<SectionTable>>
Parse the COFF section headers.
For COFF, these immediately follow the COFF header. For PE, these immediately follow the optional header.
sourcepub fn symbols<'a>(&self, bytes: &'a [u8]) -> Result<SymbolTable<'a>>
pub fn symbols<'a>(&self, bytes: &'a [u8]) -> Result<SymbolTable<'a>>
Return the COFF symbol table.
Trait Implementations§
source§impl Clone for CoffHeader
impl Clone for CoffHeader
source§fn clone(&self) -> CoffHeader
fn clone(&self) -> CoffHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CoffHeader
impl Debug for CoffHeader
source§impl Default for CoffHeader
impl Default for CoffHeader
source§fn default() -> CoffHeader
fn default() -> CoffHeader
Returns the “default value” for a type. Read more
source§impl<'a> IntoCtx<Endian> for &'a CoffHeader
impl<'a> IntoCtx<Endian> for &'a CoffHeader
source§impl PartialEq for CoffHeader
impl PartialEq for CoffHeader
source§fn eq(&self, other: &CoffHeader) -> bool
fn eq(&self, other: &CoffHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> TryFromCtx<'a, Endian> for CoffHeaderwhere
CoffHeader: 'a,
impl<'a> TryFromCtx<'a, Endian> for CoffHeaderwhere CoffHeader: 'a,
source§impl<'a> TryIntoCtx<Endian> for &'a CoffHeader
impl<'a> TryIntoCtx<Endian> for &'a CoffHeader
source§impl TryIntoCtx<Endian> for CoffHeader
impl TryIntoCtx<Endian> for CoffHeader
impl Copy for CoffHeader
impl StructuralPartialEq for CoffHeader
Auto Trait Implementations§
impl RefUnwindSafe for CoffHeader
impl Send for CoffHeader
impl Sync for CoffHeader
impl Unpin for CoffHeader
impl UnwindSafe for CoffHeader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more