aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-11-20 13:04:56 +0000
committerNick Clifton <nickc@redhat.com>2020-11-20 13:04:56 +0000
commite6f6aa8d184c38230d9acd91a49aa0cbe3f37e42 (patch)
treee79643c26315046beb132228fdbb4d26b025e4fa /binutils/doc
parent8881640c8071b04fa2566f21eb2a47e691caf11c (diff)
downloadgdb-e6f6aa8d184c38230d9acd91a49aa0cbe3f37e42.zip
gdb-e6f6aa8d184c38230d9acd91a49aa0cbe3f37e42.tar.gz
gdb-e6f6aa8d184c38230d9acd91a49aa0cbe3f37e42.tar.bz2
Add option to nm to change the characters displayed for ifunc symbols. Add a configure time option to change the default characters.
PR 22967 * nm.c (ifunc_type_chars): New variable. (long_options): Add --ifunc-chars. (print_symbol): Use ifunc_type_chars for ifunc symbols. (main): Handle the new option. * doc/binutils.texi: Document the new option. * configure.ac: Add --enable-f-for-ifunc-symbols option which changes the default symbol displayed by nm. * NEWS: Mention the new feature. * testsuite/binutils-all/nm.exp: Test the new feature. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi31
1 files changed, 25 insertions, 6 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 41fd92a..671694f 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -797,6 +797,7 @@ nm [@option{-A}|@option{-o}|@option{--print-file-name}] [@option{-a}|@option{--d
[@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{-l}|@option{--line-numbers}] [@option{--inlines}]
[@option{-n}|@option{-v}|@option{--numeric-sort}]
[@option{-P}|@option{--portability}] [@option{-p}|@option{--no-sort}]
@@ -869,12 +870,21 @@ such as a global int variable as opposed to a large global array.
@item i
For PE format files this indicates that the symbol is in a section
-specific to the implementation of DLLs. For ELF format files this
-indicates that the symbol is an indirect function. This is a GNU
-extension to the standard set of ELF symbol types. It indicates a
-symbol which if referenced by a relocation does not evaluate to its
-address, but instead must be invoked at runtime. The runtime
-execution will then return the value to be used in the relocation.
+specific to the implementation of DLLs.
+
+For ELF format files this indicates that the symbol is an indirect
+function. This is a GNU extension to the standard set of ELF symbol
+types. It indicates a symbol which if referenced by a relocation does
+not evaluate to its address, but instead must be invoked at runtime.
+The runtime execution will then return the value to be used in the
+relocation.
+
+Note - the actual symbols display for GNU indirect symbols is
+controlled by the @option{--ifunc-chars} command line option. If this
+option has been provided then the first character in the string will
+be used for global indirect function symbols. If the string contains
+a second character then that will be used for local indirect function
+symbols.
@item I
The symbol is an indirect reference to another symbol.
@@ -1029,6 +1039,15 @@ Display only external symbols.
@itemx --help
Show a summary of the options to @command{nm} and exit.
+@item --ifunc-chars=@var{CHARS}
+When display GNU indirect function symbols @command{nm} will default
+to using the @code{i} character for both local indirect functions and
+global indirect functions. The @option{--ifunc-chars} option allows
+the user to specify a string containing one or two characters. The
+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 -l
@itemx --line-numbers
@cindex symbol line numbers