SymbolTableBuilder.addSymbol
size_t addSymbol(uint name, ulong value, ulong size,
types.SymbolBinding binding, types.SymbolType type,
ushort section, types.SymbolVisibility visibility = types.SymbolVisibility.DEFAULT)Add a symbol to the symbol table.
The returned symbol handle is stable across subsequent additions, regardless of whether further local or global symbols are added. When all local symbols are added before all non-local symbols, the handle equals the final table index; in mixed insertion order, call getIndex(handle) to retrieve the finalized index in the sorted table.
Parameters
name | The symbol name (string table index). |
value | The symbol's value/address. |
size | The symbol's size. |
binding | The symbol's binding. |
type | The symbol's type. |
section | The section index or special value. |
visibility | The symbol's visibility (default). |
Returns
A stable handle for the symbol.