#[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
sourceimpl 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
sourceimpl Clone for CoffHeader
impl Clone for CoffHeader
sourcefn clone(&self) -> CoffHeader
fn clone(&self) -> CoffHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CoffHeader
impl Debug for CoffHeader
sourceimpl Default for CoffHeader
impl Default for CoffHeader
sourcefn default() -> CoffHeader
fn default() -> CoffHeader
Returns the “default value” for a type. Read more
sourceimpl<'a> IntoCtx<Endian, [u8]> for &'a CoffHeader
impl<'a> IntoCtx<Endian, [u8]> for &'a CoffHeader
sourceimpl PartialEq<CoffHeader> for CoffHeader
impl PartialEq<CoffHeader> for CoffHeader
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &CoffHeader) -> bool
fn ne(&self, other: &CoffHeader) -> bool
This method tests for !=
.
sourceimpl<'a> TryFromCtx<'a, Endian, [u8]> for CoffHeader where
CoffHeader: 'a,
impl<'a> TryFromCtx<'a, Endian, [u8]> for CoffHeader where
CoffHeader: 'a,
sourceimpl<'a> TryIntoCtx<Endian, [u8]> for &'a CoffHeader
impl<'a> TryIntoCtx<Endian, [u8]> for &'a CoffHeader
sourceimpl TryIntoCtx<Endian, [u8]> for CoffHeader
impl TryIntoCtx<Endian, [u8]> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more