aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog13
-rw-r--r--binutils/doc/binutils.texi10
-rw-r--r--binutils/nm.c26
3 files changed, 21 insertions, 28 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 9dc7136863f..54c575a8d2e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,16 @@
+2021-01-01 Alan Modra <amodra@gmail.com>
+
+ Apply from master
+ 2020-08-10 H.J. Lu <hongjiu.lu@intel.com>
+ PR binutils/26302
+ * nm.c (with_symbol_versions): Removed.
+ (long_option_values): Add OPTION_WITH_SYMBOL_VERSIONS.
+ (long_options): Update --with-symbol-versions entry.
+ (print_symbol): Remove the with_symbol_versions check.
+ (main): Add OPTION_WITH_SYMBOL_VERSIONS for backward
+ compatibility.
+ * doc/binutils.texi: Remove --with-symbol-versions.
+
2020-11-22 Alan Modra <amodra@gmail.com>
PR 26929
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index f19862655bd..a2afcba3dbc 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -796,7 +796,7 @@ nm [@option{-A}|@option{-o}|@option{--print-file-name}] [@option{-a}|@option{--d
[@option{--plugin} @var{name}]
[@option{--no-recurse-limit}|@option{--recurse-limit}]]
[@option{--size-sort}] [@option{--special-syms}]
- [@option{--synthetic}] [@option{--with-symbol-versions}] [@option{--target=}@var{bfdname}]
+ [@option{--synthetic}] [@option{--target=}@var{bfdname}]
[@var{objfile}@dots{}]
@c man end
@end smallexample
@@ -1130,14 +1130,6 @@ Include synthetic symbols in the output. These are special symbols
created by the linker for various purposes. They are not shown by
default since they are not part of the binary's original source code.
-@item --with-symbol-versions
-Enables the display of symbol version information if any exists. The
-version string is displayed as a suffix to the symbol name, preceeded by
-an @@ character. For example @samp{foo@@VER_1}. If the version is
-the default version to be used when resolving unversioned references
-to the symbol then it is displayed as a suffix preceeded by two @@
-characters. For example @samp{foo@@@@VER_2}.
-
@item --target=@var{bfdname}
@cindex object code format
Specify an object code format other than your system's default format.
diff --git a/binutils/nm.c b/binutils/nm.c
index 1b5122d56ab..69e697ae925 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -161,7 +161,6 @@ static int show_version = 0; /* Show the version number. */
static int show_synthetic = 0; /* Display synthesized symbols too. */
static int line_numbers = 0; /* Print line numbers for symbols. */
static int allow_special_symbols = 0; /* Allow special symbols. */
-static int with_symbol_versions = 0; /* Include symbol version information in the output. */
static int demangle_flags = DMGL_ANSI | DMGL_PARAMS;
@@ -192,7 +191,8 @@ enum long_option_values
OPTION_PLUGIN,
OPTION_SIZE_SORT,
OPTION_RECURSE_LIMIT,
- OPTION_NO_RECURSE_LIMIT
+ OPTION_NO_RECURSE_LIMIT,
+ OPTION_WITH_SYMBOL_VERSIONS
};
static struct option long_options[] =
@@ -226,7 +226,8 @@ static struct option long_options[] =
{"defined-only", no_argument, &defined_only, 1},
{"undefined-only", no_argument, &undefined_only, 1},
{"version", no_argument, &show_version, 1},
- {"with-symbol-versions", no_argument, &with_symbol_versions, 1},
+ {"with-symbol-versions", no_argument, NULL,
+ OPTION_WITH_SYMBOL_VERSIONS},
{0, no_argument, 0, 0}
};
@@ -901,22 +902,6 @@ print_symbol (bfd * abfd,
format->print_symbol_info (&info, abfd);
- if (with_symbol_versions)
- {
- const char * version_string = NULL;
- bfd_boolean hidden = FALSE;
-
- if ((sym->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0)
- version_string = bfd_get_symbol_version_string (abfd, sym,
- TRUE, &hidden);
-
- if (bfd_is_und_section (bfd_asymbol_section (sym)))
- hidden = TRUE;
-
- if (version_string && *version_string != '\0')
- printf (hidden ? "@%s" : "@@%s", version_string);
- }
-
if (line_numbers)
{
static asymbol **syms;
@@ -1761,6 +1746,9 @@ main (int argc, char **argv)
case OPTION_NO_RECURSE_LIMIT:
demangle_flags |= DMGL_NO_RECURSE_LIMIT;
break;
+ case OPTION_WITH_SYMBOL_VERSIONS:
+ /* Ignored for backward compatibility. */
+ break;
case 'D':
dynamic = 1;
break;