| 1 |
// Copyright 2013 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
// Nm lists the symbols defined or used by an object file, archive, or executable. |
| 6 |
// |
| 7 |
// Usage: |
| 8 |
// |
| 9 |
// go tool nm [options] file... |
| 10 |
// |
| 11 |
// The default output prints one line per symbol, with three space-separated |
| 12 |
// fields giving the address (in hexadecimal), type (a character), and name of |
| 13 |
// the symbol. The types are: |
| 14 |
// |
| 15 |
// T text (code) segment symbol |
| 16 |
// t static text segment symbol |
| 17 |
// R read-only data segment symbol |
| 18 |
// r static read-only data segment symbol |
| 19 |
// D data segment symbol |
| 20 |
// d static data segment symbol |
| 21 |
// B bss segment symbol |
| 22 |
// b static bss segment symbol |
| 23 |
// C constant address |
| 24 |
// U referenced but undefined symbol |
| 25 |
// |
| 26 |
// Following established convention, the address is omitted for undefined |
| 27 |
// symbols (type U). |
| 28 |
// |
| 29 |
// The options control the printed output: |
| 30 |
// |
| 31 |
// -n |
| 32 |
// an alias for -sort address (numeric), |
| 33 |
// for compatibility with other nm commands |
| 34 |
// -size |
| 35 |
// print symbol size in decimal between address and type |
| 36 |
// -sort {address,name,none,size} |
| 37 |
// sort output in the given order (default name) |
| 38 |
// size orders from largest to smallest |
| 39 |
// -type |
| 40 |
// print symbol type after name |
| 41 |
package main |