aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-03-15 10:55:49 +0000
committerNick Clifton <nickc@redhat.com>2021-03-15 10:55:49 +0000
commit1996d0f12cd57391e01e0eebe32e44510e6ec17d (patch)
tree9c5ae8fdf4eb04328ff41b4459d571b4f8a7f7fb /binutils/doc
parent8d624a9d8050ca96e154215c7858ac5c2d8b0b19 (diff)
downloadgdb-1996d0f12cd57391e01e0eebe32e44510e6ec17d.zip
gdb-1996d0f12cd57391e01e0eebe32e44510e6ec17d.tar.gz
gdb-1996d0f12cd57391e01e0eebe32e44510e6ec17d.tar.bz2
Add a symbols-only mode to nm.
PR 27487 * nm.c (FORMAT_JUST_SYMBOLS): Define. (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS. (long_options): Add just-symbols. (set_output_format): Add support for just-symbols. (get_print_format): Likewise. (do_not_print_object_filename): New function. (do_not_print_archive_filename): New function. (do_not_print_archive_member): New function. (do_not_print_symbol_filename): New function. (just_print_symbol_name): New function. (main): Handle --just-symbols. * NEWS: Mention the new feature. * doc/binutils.texi: Document the new feature.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi45
1 files changed, 31 insertions, 14 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index a9d1dd3..292f711 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -793,23 +793,37 @@ The @sc{gnu} linker @command{ld} is now described in a separate manual.
@smallexample
@c man begin SYNOPSIS nm
-nm [@option{-A}|@option{-o}|@option{--print-file-name}] [@option{-a}|@option{--debug-syms}]
- [@option{-B}|@option{--format=bsd}] [@option{-C}|@option{--demangle}[=@var{style}]]
- [@option{-D}|@option{--dynamic}] [@option{-f}@var{format}|@option{--format=}@var{format}]
- [@option{-g}|@option{--extern-only}] [@option{-h}|@option{--help}]
+nm [@option{-A}|@option{-o}|@option{--print-file-name}]
+ [@option{-a}|@option{--debug-syms}]
+ [@option{-B}|@option{--format=bsd}]
+ [@option{-C}|@option{--demangle}[=@var{style}]]
+ [@option{-D}|@option{--dynamic}]
+ [@option{-f}@var{format}|@option{--format=}@var{format}]
+ [@option{-g}|@option{--extern-only}]
+ [@option{-h}|@option{--help}]
[@option{--ifunc-chars=@var{CHARS}}]
+ [@option{-j}|@option{--format=just-symbols}]
[@option{-l}|@option{--line-numbers}] [@option{--inlines}]
[@option{-n}|@option{-v}|@option{--numeric-sort}]
- [@option{-P}|@option{--portability}] [@option{-p}|@option{--no-sort}]
- [@option{-r}|@option{--reverse-sort}] [@option{-S}|@option{--print-size}]
- [@option{-s}|@option{--print-armap}] [@option{-t} @var{radix}|@option{--radix=}@var{radix}]
- [@option{-u}|@option{--undefined-only}] [@option{-V}|@option{--version}]
- [@option{-X 32_64}] [@option{--defined-only}] [@option{--no-demangle}]
- [@option{--plugin} @var{name}]
+ [@option{-P}|@option{--portability}]
+ [@option{-p}|@option{--no-sort}]
+ [@option{-r}|@option{--reverse-sort}]
+ [@option{-S}|@option{--print-size}]
+ [@option{-s}|@option{--print-armap}]
+ [@option{-t} @var{radix}|@option{--radix=}@var{radix}]
+ [@option{-u}|@option{--undefined-only}]
+ [@option{-V}|@option{--version}]
+ [@option{-X 32_64}]
+ [@option{--defined-only}]
+ [@option{--no-demangle}]
[@option{--no-recurse-limit}|@option{--recurse-limit}]]
- [@option{--size-sort}] [@option{--special-syms}]
- [@option{--synthetic}] [@option{--with-symbol-versions}]
- [@option{--without-symbol-versions}] [@option{--target=}@var{bfdname}]
+ [@option{--plugin} @var{name}]
+ [@option{--size-sort}]
+ [@option{--special-syms}]
+ [@option{--synthetic}]
+ [@option{--target=}@var{bfdname}]
+ [@option{--with-symbol-versions}]
+ [@option{--without-symbol-versions}]
[@var{objfile}@dots{}]
@c man end
@end smallexample
@@ -1027,7 +1041,7 @@ libraries.
@cindex @command{nm} format
@cindex @command{nm} compatibility
Use the output format @var{format}, which can be @code{bsd},
-@code{sysv}, or @code{posix}. The default is @code{bsd}.
+@code{sysv}, @code{posix} or @code{just-symbols}. The default is @code{bsd}.
Only the first character of @var{format} is significant; it can be
either upper or lower case.
@@ -1049,6 +1063,9 @@ first character will be used for global indirect function symbols and
the second character, if present, will be used for local indirect
function symbols.
+@item j
+The same as @option{--format=just-symbols}.
+
@item -l
@itemx --line-numbers
@cindex symbol line numbers