diff options
author | emaste <emaste@FreeBSD.org> | 2015-01-08 14:35:16 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-01-08 14:35:16 +0000 |
commit | fdfcc69d9787842bcc3b1aa0d7b948637d691cb6 (patch) | |
tree | d3331cca905ef521b58af63a5358b517863ba6be /contrib/elftoolchain/nm | |
parent | 7b6cc6221116e74bcff9f8123f18c624880ddf9c (diff) | |
download | FreeBSD-src-fdfcc69d9787842bcc3b1aa0d7b948637d691cb6.zip FreeBSD-src-fdfcc69d9787842bcc3b1aa0d7b948637d691cb6.tar.gz |
nm: Accept long option --extern-only for -g
Submitted by: jkim
Diffstat (limited to 'contrib/elftoolchain/nm')
-rw-r--r-- | contrib/elftoolchain/nm/nm.1 | 8 | ||||
-rw-r--r-- | contrib/elftoolchain/nm/nm.c | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/contrib/elftoolchain/nm/nm.1 b/contrib/elftoolchain/nm/nm.1 index 0ae9a22..d9a0325 100644 --- a/contrib/elftoolchain/nm/nm.1 +++ b/contrib/elftoolchain/nm/nm.1 @@ -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 . diff --git a/contrib/elftoolchain/nm/nm.c b/contrib/elftoolchain/nm/nm.c index 9afe0ba..8d9cbbd 100644 --- a/contrib/elftoolchain/nm/nm.c +++ b/contrib/elftoolchain/nm/nm.c @@ -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.\ |