symbol

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSymbolPrefixUnder

func AddSymbolPrefixUnder(name string, isCpp bool) string

For mutiple os test,the nm output's symbol name is different.

func GenSymbolTableData

func GenSymbolTableData(commonSymbols []*llcppg.SymbolInfo, existingSymbols map[string]llcppg.SymbolInfo) ([]byte, error)

func GenerateAndUpdateSymbolTable

func GenerateAndUpdateSymbolTable(symbols []*nm.Symbol, headerInfos map[string]*parse.SymbolInfo, symbFile string) ([]byte, error)

func GetCommonSymbols

func GetCommonSymbols(dylibSymbols []*nm.Symbol, headerSymbols map[string]*parse.SymbolInfo) []*llcppg.SymbolInfo

finds the intersection of symbols from the dynamic library's symbol table and the symbols parsed from header files. It returns a list of symbols that can be externally linked.

func ParseDylibSymbols

func ParseDylibSymbols(lib string) ([]*nm.Symbol, error)

ParseDylibSymbols parses symbols from dynamic libraries specified in the lib string. It handles multiple libraries (e.g., -L/opt/homebrew/lib -llua -lm) and returns symbols if at least one library is successfully parsed. Errors from inaccessible libraries (like standard libs) are logged as warnings.

Returns symbols and nil error if any symbols are found, or nil and error if none found.

func ReadExistingSymbolTable

func ReadExistingSymbolTable(fileName string) (map[string]llcppg.SymbolInfo, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL