svn commit: r276821 - head/contrib/elftoolchain/nm
Ed Maste
emaste at FreeBSD.org
Thu Jan 8 14:35:17 UTC 2015
Author: emaste
Date: Thu Jan 8 14:35:16 2015
New Revision: 276821
URL: https://svnweb.freebsd.org/changeset/base/276821
Log:
nm: Accept long option --extern-only for -g
Submitted by: jkim
Modified:
head/contrib/elftoolchain/nm/nm.1
head/contrib/elftoolchain/nm/nm.c
Modified: head/contrib/elftoolchain/nm/nm.1
==============================================================================
--- head/contrib/elftoolchain/nm/nm.1 Thu Jan 8 14:29:03 2015 (r276820)
+++ head/contrib/elftoolchain/nm/nm.1 Thu Jan 8 14:35:16 2015 (r276821)
@@ -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
.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 .
Modified: head/contrib/elftoolchain/nm/nm.c
==============================================================================
--- head/contrib/elftoolchain/nm/nm.c Thu Jan 8 14:29:03 2015 (r276820)
+++ head/contrib/elftoolchain/nm/nm.c Thu Jan 8 14:35:16 2015 (r276821)
@@ -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.\
More information about the svn-src-all
mailing list