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
sourceimpl 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.
sourceimpl ImageSymbol
impl ImageSymbol
Trait Implementations
sourceimpl Clone for ImageSymbol
impl Clone for ImageSymbol
sourcefn clone(&self) -> ImageSymbol
fn clone(&self) -> ImageSymbol
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 ImageSymbol
impl Debug for ImageSymbol
impl Copy for ImageSymbol
impl Pod for ImageSymbol
Auto Trait Implementations
impl RefUnwindSafe for ImageSymbol
impl Send for ImageSymbol
impl Sync for ImageSymbol
impl Unpin for ImageSymbol
impl UnwindSafe for ImageSymbol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more