1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

nm: Accept long option --extern-only for -g

Submitted by:	jkim
This commit is contained in:
Ed Maste 2015-01-08 14:35:16 +00:00
parent ef6db57978
commit 9a1048f7e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276821
2 changed files with 8 additions and 3 deletions

View File

@ -24,7 +24,7 @@
.\"
.\" $Id: nm.1 2377 2012-01-03 07:10:59Z jkoshy $
.\"
.Dd January 3, 2012
.Dd January 8, 2015
.Os
.Dt NM 1
.Sh NAME
@ -36,6 +36,7 @@
.Op Fl -defined-only
.Op Fl -demangle Ns Op = Ns style
.Op Fl -dynamic
.Op Fl -extern-only
.Op Fl -help
.Op Fl -line-numbers
.Op Fl -no-demangle
@ -107,6 +108,8 @@ is not specified, it is taken to be
.It Fl -dynamic
Only display dynamic symbols.
This option is only meaningful for shared libraries.
.It Fl -extern-only
Only display information about global (external) symbols.
.It Fl -help
Display a help message and exit.
.It Fl -format Ns = Ns Ar format
@ -200,7 +203,8 @@ Only display information for global and static symbols.
.It Fl f
Produce full output (default).
.It Fl g
Only display information about global (external) symbols.
Equivalent to specifying option
.Fl -extern-only .
.It Fl h
Equivalent to specifying option
.Fl -help .

View File

@ -248,6 +248,7 @@ static const struct option nm_longopts[] = {
{ "defined-only", no_argument, &nm_opts.def_only, 1},
{ "demangle", optional_argument, NULL, 'C' },
{ "dynamic", no_argument, NULL, 'D' },
{ "extern-only", no_argument, NULL, 'g' },
{ "format", required_argument, NULL, 'F' },
{ "help", no_argument, NULL, 'h' },
{ "line-numbers", no_argument, NULL, 'l' },
@ -2042,7 +2043,7 @@ usage(int exitcode)
\n -f Produce full output (default).\
\n --format=format Display output in specific format. Allowed\
\n formats are: \"bsd\", \"posix\" and \"sysv\".\
\n -g Display only global symbol information.\
\n -g, --extern-only Display only global symbol information.\
\n -h, --help Show this help message.\
\n -l, --line-numbers Display filename and linenumber using\
\n debugging information.\