diff options
author | Jaana Burcu Dogan <jbd@google.com> | 2017-02-10 14:34:37 -0800 |
---|---|---|
committer | Jaana Burcu Dogan <jbd@google.com> | 2017-02-11 08:47:58 +0000 |
commit | 60d7d247a1a5d96152061aa9cfeb5466b90a6787 (patch) | |
tree | 819c79b4aaa270db63d750a80b9dd9d85797abb8 /src/cmd/nm | |
parent | 948b21a3d7419ba42c574bde89c199b522221dc6 (diff) | |
download | go-60d7d247a1a5d96152061aa9cfeb5466b90a6787.tar.gz go-60d7d247a1a5d96152061aa9cfeb5466b90a6787.zip |
cmd/nm: extend help text to document the flags
Change-Id: Ia2852666ef44e7ef0bba2360e92caccc83fd0e5c
Reviewed-on: https://go-review.googlesource.com/36796
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/nm')
-rw-r--r-- | src/cmd/nm/nm.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cmd/nm/nm.go b/src/cmd/nm/nm.go index 4384af8fae..2e2dd75018 100644 --- a/src/cmd/nm/nm.go +++ b/src/cmd/nm/nm.go @@ -15,8 +15,21 @@ import ( "cmd/internal/objfile" ) +const helpText = `usage: go tool nm [options] file... + -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 +` + func usage() { - fmt.Fprintf(os.Stderr, "usage: go tool nm [-n] [-size] [-sort order] [-type] file...\n") + fmt.Fprintf(os.Stderr, helpText) os.Exit(2) } |