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

nameThe symbol name (string table index).
valueThe symbol's value/address.
sizeThe symbol's size.
bindingThe symbol's binding.
typeThe symbol's type.
sectionThe section index or special value.
visibilityThe symbol's visibility (default).

Returns

A stable handle for the symbol.