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

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[src]

The index of the symbol.

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

The name of the symbol.

fn address(&self) -> u64[src]

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

fn size(&self) -> u64[src]

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

fn kind(&self) -> SymbolKind[src]

Return the kind of this symbol.

fn section(&self) -> SymbolSection[src]

Returns the section where the symbol is defined.

fn is_undefined(&self) -> bool[src]

Return true if the symbol is undefined.

fn is_definition(&self) -> bool[src]

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

fn is_common(&self) -> bool[src]

Return true if the symbol is common data.

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

fn is_weak(&self) -> bool[src]

Return true if the symbol is weak.

fn scope(&self) -> SymbolScope[src]

Returns the symbol scope.

fn is_global(&self) -> bool[src]

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

This treats SymbolScope::Unknown as global.

fn is_local(&self) -> bool[src]

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

fn flags(&self) -> SymbolFlags<SectionIndex>[src]

Symbol flags that are specific to each file format.

Loading content...

Provided methods

fn section_index(&self) -> Option<SectionIndex>[src]

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, 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...