pub trait ObjectSymbol<'data>: Sealed {
Show 16 methods fn index(&self) -> SymbolIndex;
fn name_bytes(&self) -> Result<&'data [u8]>;
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> { ... }
}
Expand description

A symbol table entry.

Required methods

The index of the symbol.

The name of the symbol.

The name of the symbol.

Returns an error if the name is not UTF-8.

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

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

Return the kind of this symbol.

Returns the section where the symbol is defined.

Return true if the symbol is undefined.

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

Return true if the symbol is common data.

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

Return true if the symbol is weak.

Returns the symbol scope.

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

This treats SymbolScope::Unknown as global.

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

Symbol flags that are specific to each file format.

Provided methods

Returns the section index for the section containing this symbol.

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

Implementors