2013-12-16 10:52:11 -07:00
|
|
|
// Copyright 2013 The Go Authors. All rights reserved.
|
2009-11-03 18:46:35 -07:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2013-12-16 10:52:11 -07:00
|
|
|
// 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
|
2013-12-18 11:29:40 -07:00
|
|
|
// R read-only data segment symbol
|
|
|
|
// r static read-only data segment symbol
|
2013-12-16 10:52:11 -07:00
|
|
|
// D data segment symbol
|
|
|
|
// d static data segment symbol
|
|
|
|
// B bss segment symbol
|
|
|
|
// b static bss segment symbol
|
|
|
|
// 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),
|
2013-12-27 09:59:02 -07:00
|
|
|
// for compatibility with other nm commands
|
2013-12-16 10:52:11 -07:00
|
|
|
// -size
|
|
|
|
// print symbol size in decimal between address and type
|
|
|
|
// -sort {address,name,none}
|
|
|
|
// sort output in the given order (default name)
|
|
|
|
// -type
|
|
|
|
// print symbol type after name
|
|
|
|
//
|
2013-02-19 12:19:58 -07:00
|
|
|
package main
|