Struct object::pe::ImageSymbol
source · #[repr(C)]pub struct ImageSymbol {
pub name: [u8; 8],
pub value: U32Bytes<LE>,
pub section_number: U16Bytes<LE>,
pub typ: U16Bytes<LE>,
pub storage_class: u8,
pub number_of_aux_symbols: u8,
}
Fields§
§name: [u8; 8]
If first 4 bytes are 0, then second 4 bytes are offset into string table.
value: U32Bytes<LE>
§section_number: U16Bytes<LE>
§typ: U16Bytes<LE>
§storage_class: u8
§number_of_aux_symbols: u8
Implementations§
source§impl ImageSymbol
impl ImageSymbol
sourcepub fn name<'data, R: ReadRef<'data>>(
&'data self,
strings: StringTable<'data, R>
) -> Result<&'data [u8]>
pub fn name<'data, R: ReadRef<'data>>(
&'data self,
strings: StringTable<'data, R>
) -> Result<&'data [u8]>
Parse a COFF symbol name.
strings
must be the string table used for symbol names.
sourcepub fn address(&self, image_base: u64, sections: &SectionTable<'_>) -> Result<u64>
pub fn address(&self, image_base: u64, sections: &SectionTable<'_>) -> Result<u64>
Return the symbol address.
This takes into account the image base and the section address.
sourcepub fn is_definition(&self) -> bool
pub fn is_definition(&self) -> bool
Return true if the symbol is a definition of a function or data object.
sourcepub fn has_aux_file_name(&self) -> bool
pub fn has_aux_file_name(&self) -> bool
Return true if the symbol has an auxiliary file name.
sourcepub fn has_aux_function(&self) -> bool
pub fn has_aux_function(&self) -> bool
Return true if the symbol has an auxiliary function symbol.
sourcepub fn has_aux_section(&self) -> bool
pub fn has_aux_section(&self) -> bool
Return true if the symbol has an auxiliary section symbol.
source§impl ImageSymbol
impl ImageSymbol
Trait Implementations§
source§impl Clone for ImageSymbol
impl Clone for ImageSymbol
source§fn clone(&self) -> ImageSymbol
fn clone(&self) -> ImageSymbol
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 more