nm

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code added in v0.8.0

type Code rune

Code represents the type of a symbol in the nm output.

const (
	CodeText          Code = 'T' // text (code) section
	CodeTextLocal     Code = 't' // text (code) section, local
	CodeData          Code = 'D' // initialized data section
	CodeDataLocal     Code = 'd' // initialized data section, local
	CodeBSS           Code = 'B' // uninitialized data (BSS) section
	CodeBSSLocal      Code = 'b' // uninitialized data (BSS) section, local
	CodeReadOnly      Code = 'R' // read-only data section
	CodeReadOnlyLocal Code = 'r' // read-only data section, local
	CodeUndefined     Code = 'U' // undefined symbol
	CodeCommon        Code = 'C' // common symbol (uninitialized data)
	CodeWeak          Code = 'W' // weak symbol
	CodeWeakLocal     Code = 'w' // weak symbol, local
)

func (Code) ConsumesBinary added in v0.8.0

func (code Code) ConsumesBinary() bool

ConsumesBinary returns true if the symbol consumes binary space.

type Sym

type Sym struct {
	Addr uint64
	Size int64
	Code Code // nm code (T for text, D for data, and so on)

	QualifiedName string

	Path []string
	Name string
}

func ParseBinary

func ParseBinary(binary string) ([]*Sym, error)

func (*Sym) MaybeSize added in v0.8.0

func (sym *Sym) MaybeSize() int64

Jump to

Keyboard shortcuts

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