pub struct Symbol {
    pub name: Vec<u8>,
    pub value: u64,
    pub size: u64,
    pub kind: SymbolKind,
    pub scope: SymbolScope,
    pub weak: bool,
    pub section: SymbolSection,
    pub flags: SymbolFlags<SectionId>,
}
Expand description

A symbol in an object file.

Fields

name: Vec<u8>

The name of the symbol.

value: u64

The value of the symbol.

If the symbol defined in a section, then this is the section offset of the symbol.

size: u64

The size of the symbol.

kind: SymbolKind

The kind of the symbol.

scope: SymbolScope

The scope of the symbol.

weak: bool

Whether the symbol has weak binding.

section: SymbolSection

The section containing the symbol.

flags: SymbolFlags<SectionId>

Symbol flags that are specific to each file format.

Implementations

Try to convert the name to a utf8 string.

Return true if the symbol is undefined.

Return true if the symbol is common data.

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

Return true if the symbol scope is local.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.