diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-08-10 05:17:28 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-08-10 05:17:41 -0700 |
commit | 9b0ac51b22d0cf900f39e17e615bb22e32720f6e (patch) | |
tree | 39644cd7c9bdaf1c6d530f22c56d9c21c422d8d1 /binutils/nm.c | |
parent | 40f3419a8150eac5855ef89bc2ce3532b0372e57 (diff) | |
download | gdb-9b0ac51b22d0cf900f39e17e615bb22e32720f6e.zip gdb-9b0ac51b22d0cf900f39e17e615bb22e32720f6e.tar.gz gdb-9b0ac51b22d0cf900f39e17e615bb22e32720f6e.tar.bz2 |
nm: Remove --with-symbol-versions
Since
commit 7e6e972f74aeac0ebdbd95a7f905d871cd2581de
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Mar 24 04:23:11 2020 -0700
bfd: Display symbol version for nm -D
always displays symbol version for nm, remove --with-symbol-versions and
silently accept it for backward compatibility.
binutils/
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.
ld/
PR binutils/26302
* testsuite/ld-elf/pr26302.nd: New file.
* testsuite/ld-elf/pr26302.ver: Likewise.
* testsuite/ld-elf/pr26302a.c: Likewise.
* testsuite/ld-elf/pr26302b.c: Likewise.
* testsuite/ld-elf/shared.exp: Run binutils/26302 tests.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r-- | binutils/nm.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/binutils/nm.c b/binutils/nm.c index 1b5122d..69e697a 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; |