Struct goblin::pe::symbol::Symbol[][src]

#[repr(C)]
pub struct Symbol { pub name: [u8; 8], pub value: u32, pub section_number: i16, pub typ: u16, pub storage_class: u8, pub number_of_aux_symbols: u8, }
Expand description

A COFF symbol.

Unwind information for this function can be loaded with ExceptionData::get_unwind_info.

Fields

name: [u8; 8]

The name of the symbol.

An array of 8 bytes is used if the name is not more than 8 bytes long. This array is padded with nulls on the right if the name is less than 8 bytes long.

For longer names, the first 4 bytes are all zeros, and the second 4 bytes are an offset into the string table.

value: u32

The value that is associated with the symbol.

The interpretation of this field depends on section_number and storage_class. A typical meaning is the relocatable address.

section_number: i16

A one-based index into the section table. Zero and negative values have special meanings.

typ: u16

A number that represents type.

Microsoft tools set this field to 0x20 (function) or 0x0 (not a function).

storage_class: u8

An enumerated value that represents storage class.

number_of_aux_symbols: u8

The number of auxiliary symbol table entries that follow this record.

Each auxiliary record is the same size as a standard symbol-table record (18 bytes), but rather than define a new symbol, the auxiliary record gives additional information on the last symbol defined.

Implementations

Parse the symbol at the given offset.

If the symbol has an inline name, then also returns a reference to the name’s location in bytes.

Returns the symbol name.

This may be a reference to an inline name in the symbol, or to a strtab entry.

Return the strtab offset of the symbol name.

Returns None if the name is inline.

Set the strtab offset of the symbol name.

Return the base type of the symbol.

This type uses the IMAGE_SYM_TYPE_* definitions.

Return the derived type of the symbol.

This type uses the IMAGE_SYM_DTYPE_* definitions.

Return true for function definitions.

These symbols use AuxFunctionDefinition for auxiliary symbol records.

Return true for weak external symbols.

These symbols use AuxWeakExternal for auxiliary symbol records.

Return true for file symbol records.

The auxiliary records contain the name of the source code file.

Return true for section definitions.

These symbols use AuxSectionDefinition for auxiliary symbol records.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.