This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[RFA] Improve output `nm --help'
- To: binutils at sourceware dot cygnus dot com
- Subject: [RFA] Improve output `nm --help'
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Wed, 19 Jul 2000 19:35:13 +0200
The following patch makes `nm --help' print a short description of
itself and for each of its options, in the GNU tradition.
OK to commit? Comments on the wording of the descriptions is welcome
too.
Mark
2000-07-19 Mark Kettenis <kettenis@gnu.org>
* nm.c (usage): Change output of `nm --help' to include a
description of the purpose of the program and a detailed
description of the accepted options.
Index: nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.7
diff -u -p -r1.7 nm.c
--- nm.c 2000/04/07 04:34:50 1.7
+++ nm.c 2000/07/19 17:27:58
@@ -291,19 +291,38 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, _("\
-Usage: %s [-aABCDglnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n\
- [--debug-syms] [--extern-only] [--print-armap] [--print-file-name]\n\
- [--numeric-sort] [--no-sort] [--reverse-sort] [--size-sort]\n\
- [--undefined-only] [--portability] [-f {bsd,sysv,posix}]\n\
- [--format={bsd,sysv,posix}] [--demangle] [--no-demangle] [--dynamic]\n\
- [--defined-only] [--line-numbers]\n\
- [--version] [--help]\n\
- [file...]\n"),
- program_name);
+ fprintf (stream, _("Usage: %s [OPTION]... [FILE]...\n"), program_name);
+ fprintf (stream, _("List symbols from FILEs (a.out by default).\n"));
+ fprintf (stream, _("\n\
+ -a, --debug-syms Display debugger-only symbols\n\
+ -A, --print-file-name Print name of the input file before every symbol\n\
+ -B Same as --format=bsd\n\
+ -C, --demangle Decode low-level symbol names into user-level names\n\
+ --no-demangle Do not demangle low-level symbol names\n\
+ -D, --dynamic Display dynamic symbols instead of normal symbols\n\
+ --defined-only Display only defined symbols\n\
+ -e (ignored)\n\
+ -f, --format=FORMAT Use the output format FORMAT. FORMAT can be `bsd',\n\
+ `sysv' or `posix'. The default is `bsd'\n\
+ -g, --extern-only Display only external symbols\n\
+ -h, --help Display this information\n\
+ -l, --line-numbers Use debugging information to find a filename and\n\
+ line number for each symbol\n\
+ -n, --numeric-sort Sort symbols numerically by address\n\
+ -o Same as -A\n\
+ -p, --no-sort Do not sort the symbols\n\
+ -P, --portability Same as --format=posix\n\
+ -r, --reverse-sort Reverse the sense of the sort\n\
+ -s, --print-armap Include index for symbols from archive members\n\
+ --size-sort Sort symbols by size\n\
+ -t, --radix=RADIX Use RADIX for printing symbol values\n\
+ --target=BFDNAME Specify the target object format as BFDNAME\n\
+ -u, --undefined-only Display only undefined symbols\n\
+ -V, --version Display this program's version number\n\
+\n"));
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
+ fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
exit (status);
}