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