nm

command standard library
go1.26.9 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: BSD-3-Clause Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Nm lists the symbols defined or used by an object file, archive, or executable.

Usage:

go tool nm [options] file...

The default output prints one line per symbol, with three space-separated fields giving the address (in hexadecimal), type (a character), and name of the symbol. The types are:

T	text (code) segment symbol
t	static text segment symbol
R	read-only data segment symbol
r	static read-only data segment symbol
D	data segment symbol
d	static data segment symbol
B	bss segment symbol
b	static bss segment symbol
C	constant address
U	referenced but undefined symbol

Following established convention, the address is omitted for undefined symbols (type U).

The options control the printed output:

-n
	an alias for -sort address (numeric),
	for compatibility with other nm commands
-size
	print symbol size in decimal between address and type
-sort {address,name,none,size}
	sort output in the given order (default name)
	size orders from largest to smallest
-type
	print symbol type after name

Jump to

Keyboard shortcuts

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