package
1.1.3
Repository: https://go.googlesource.com/vuln
Documentation: pkg.go.dev

# README

This code is a copied and slightly modified version of go/src/debug/gosym.

The original code contains logic for accessing symbol tables and line numbers in Go binaries. The only reason why this is copied is to support inlining.

Code added by vulncheck is located in files with "additions_" prefix and it contains logic for accessing inlining information.

Within the originally named files, deleted or added logic is annotated with a comment starting with "Addition:". The modified logic allows the inlining code in "additions_*" files to access the necessary information.

# Functions

FuncSymName returns symbol name for Go functions used in binaries based on Go version.
NewLineTable returns a new PC/line table corresponding to the encoded data.
NewTable decodes the Go symbol table (the ".gosymtab" section in ELF), returning an in-memory representation.

# Structs

DecodingError represents an error during the decoding of the symbol table.
A Func collects information about a single function.
InlinedCall describes a call to an inlined function.
A LineTable is a data structure mapping program counters to line numbers.
An Obj represents a collection of functions in a symbol table.
A Sym represents a single symbol table entry.
Table represents a Go symbol table.
UnknownLineError represents a failure to map a line to a program counter, either because the line is beyond the bounds of the file or because there is no code on the given line.

# Type aliases

UnknownFileError represents a failure to find the specific file in the symbol table.