[][src]Trait object::read::ObjectSymbol

pub trait ObjectSymbol<'data>: Sealed {
    fn index(&self) -> SymbolIndex;
fn name(&self) -> Result<&'data str>;
fn address(&self) -> u64;
fn size(&self) -> u64;
fn kind(&self) -> SymbolKind;
fn section(&self) -> SymbolSection;
fn is_undefined(&self) -> bool;
fn is_definition(&self) -> bool;
fn is_common(&self) -> bool;
fn is_weak(&self) -> bool;
fn scope(&self) -> SymbolScope;
fn is_global(&self) -> bool;
fn is_local(&self) -> bool;
fn flags(&self) -> SymbolFlags<SectionIndex>; fn section_index(&self) -> Option<SectionIndex> { ... } }

A symbol table entry.

Required methods

fn index(&self) -> SymbolIndex

The index of the symbol.

fn name(&self) -> Result<&'data str>

The name of the symbol.

fn address(&self) -> u64

The address of the symbol. May be zero if the address is unknown.

fn size(&self) -> u64

The size of the symbol. May be zero if the size is unknown.

fn kind(&self) -> SymbolKind

Return the kind of this symbol.

fn section(&self) -> SymbolSection

Returns the section where the symbol is defined.

fn is_undefined(&self) -> bool

Return true if the symbol is undefined.

fn is_definition(&self) -> bool

Return true if the symbol is a definition of a function or data object that has a known address.

fn is_common(&self) -> bool

Return true if the symbol is common data.

Note: does not check for SymbolSection::Section with SectionKind::Common.

fn is_weak(&self) -> bool

Return true if the symbol is weak.

fn scope(&self) -> SymbolScope

Returns the symbol scope.

fn is_global(&self) -> bool

Return true if the symbol visible outside of the compilation unit.

This treats SymbolScope::Unknown as global.

fn is_local(&self) -> bool

Return true if the symbol is only visible within the compilation unit.

fn flags(&self) -> SymbolFlags<SectionIndex>

Symbol flags that are specific to each file format.

Loading content...

Provided methods

fn section_index(&self) -> Option<SectionIndex>

Returns the section index for the section containing this symbol.

May return None if the symbol is not defined in a section.

Loading content...

Implementors

impl<'data, 'file> ObjectSymbol<'data> for CoffSymbol<'data, 'file>[src]

impl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file>[src]

impl<'data, 'file> ObjectSymbol<'data> for WasmSymbol<'data, 'file>[src]

impl<'data, 'file, Elf: FileHeader> ObjectSymbol<'data> for ElfSymbol<'data, 'file, Elf>[src]

impl<'data, 'file, Mach: MachHeader> ObjectSymbol<'data> for MachOSymbol<'data, 'file, Mach>[src]

Loading content...