From: Jaana Burcu Dogan Date: Fri, 10 Feb 2017 22:34:37 +0000 (-0800) Subject: cmd/nm: extend help text to document the flags X-Git-Tag: go1.9beta1~1612 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=60d7d247a1a5d96152061aa9cfeb5466b90a6787;p=gostls13.git 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 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- 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) }