nm

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Undefined = SymbolType('U') // Undefined
	Text      = SymbolType('T') // Text (code) section symbol
	Data      = SymbolType('D') // Data (global var) section symbol
	Rodata    = SymbolType('R') // Read-only data (rodata) section symbol
	BSS       = SymbolType('B') // BSS (uninitialized global var) section symbol

	LocalText = SymbolType('t') // Local text (code) section symbol
	LocalData = SymbolType('d') // Local data (local var) section symbol
	LocalBSS  = SymbolType('b') // Local BSS (uninitialized local var) section symbol
	LocalASym = SymbolType('s') // Local symbol in an assembler source file
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

Cmd represents a nm command.

func New

func New(app string) *Cmd

New creates a new nm command.

func (*Cmd) List

func (p *Cmd) List(arfile string) (items []*ObjectFile, err error)

List lists symbols in an archive file.

type ObjectFile

type ObjectFile struct {
	File    string    // file name
	Symbols []*Symbol // symbols
}

ObjectFile represents an object file.

type Symbol

type Symbol struct {
	Name  string     // symbol name
	Addr  uint64     // symbol address
	Type  SymbolType // symbol type
	FAddr bool       // address is valid
}

Symbol represents a symbol in an object file.

type SymbolType

type SymbolType uint8

SymbolType represents a symbol type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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