#[repr(C)]pub struct CoffFileHeader {
pub machine: u16,
pub number_of_sections: u16,
pub time_date_stamp: u32,
pub pointer_to_symbol_table: u32,
pub number_of_symbols: u32,
pub size_of_optional_header: u16,
pub characteristics: u16,
}
Expand description
COFF File Header (Object and Image)
Fields§
§machine: u16
The number that identifies the type of target machine.
number_of_sections: u16
The number of sections. This indicates the size of the section table, which immediately follows the headers.
time_date_stamp: u32
The low 32 bits of the number of seconds since 00:00 January 1, 1970 (a C run-time time_t value), which indicates when the file was created.
pointer_to_symbol_table: u32
The file offset of the COFF symbol table, or zero if no COFF symbol table is present. This value should be zero for an image because COFF debugging information is deprecated.
number_of_symbols: u32
The number of entries in the symbol table. This data can be used to locate the string table, which immediately follows the symbol table. This value should be zero for an image because COFF debugging information is deprecated.
size_of_optional_header: u16
The size of the optional header, which is required for executable files but not for object files. This value should be zero for an object file.
characteristics: u16
The flags that indicate the attributes of the file.
Implementations§
Source§impl CoffFileHeader
impl CoffFileHeader
Sourcepub fn get_machine_type(&self) -> Option<MachineTypes>
pub fn get_machine_type(&self) -> Option<MachineTypes>
Returns the machine type as an enum
Sourcepub fn get_characteristics(&self) -> Option<Characteristics>
pub fn get_characteristics(&self) -> Option<Characteristics>
Returns the Characteristics as bitflags
Sourcepub fn get_time_date_stamp(&self) -> Option<DateTime<Utc>>
pub fn get_time_date_stamp(&self) -> Option<DateTime<Utc>>
Returns the Unix epoch timestamp as a DateTime<Utc>
Trait Implementations§
Source§impl Clone for CoffFileHeader
impl Clone for CoffFileHeader
Source§fn clone(&self) -> CoffFileHeader
fn clone(&self) -> CoffFileHeader
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for CoffFileHeader
impl Default for CoffFileHeader
Source§fn default() -> CoffFileHeader
fn default() -> CoffFileHeader
Source§impl Display for CoffFileHeader
impl Display for CoffFileHeader
impl Copy for CoffFileHeader
impl Pod for CoffFileHeader
Auto Trait Implementations§
impl Freeze for CoffFileHeader
impl RefUnwindSafe for CoffFileHeader
impl Send for CoffFileHeader
impl Sync for CoffFileHeader
impl Unpin for CoffFileHeader
impl UnwindSafe for CoffFileHeader
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.