diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-03-24 15:37:14 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-03-24 15:37:26 -0700 |
commit | 1081065c519d1bfc3847bf4b0a0ce4bc3224bcd3 (patch) | |
tree | 39fb17a236b3ab231474f156b8dd30d37740bc57 /binutils | |
parent | a18cd0cab43f45b05e9f8bcbf8fed1d67834442d (diff) | |
download | binutils-1081065c519d1bfc3847bf4b0a0ce4bc3224bcd3.zip binutils-1081065c519d1bfc3847bf4b0a0ce4bc3224bcd3.tar.gz binutils-1081065c519d1bfc3847bf4b0a0ce4bc3224bcd3.tar.bz2 |
bfd: Add a bfd_boolean argument to bfd_get_symbol_version_string
We can't call _bfd_elf_get_symbol_version_name from nm.c since it isn't
available for all target configurations. This patch add a bfd_boolean
argument to bfd_get_symbol_version_string instead.
bfd/
PR binutils/25708
* elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
(_bfd_elf_get_symbol_version_string): This.
* elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
(_bfd_elf_get_symbol_version_string): This.
(bfd_elf_print_symbol): Pass TRUE to
_bfd_elf_get_symbol_version_string.
* libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
bfd_boolean argument.
* syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
* targets.c (_bfd_get_symbol_version_string): Likewise.
(bfd_get_symbol_version_string): Likewise.
* bfd-in2.h: Regenerated.
binutils/
PR binutils/25708
* nm.c (print_symname): Replace _bfd_elf_get_symbol_version_name
with bfd_get_symbol_version_string.
(print_symbo): Pass TRUE to bfd_get_symbol_version_string.
* objdump.c (objdump_print_symname): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 8 | ||||
-rw-r--r-- | binutils/nm.c | 8 | ||||
-rw-r--r-- | binutils/objdump.c | 3 |
3 files changed, 14 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2565f36..accd265 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,6 +1,14 @@ 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> PR binutils/25708 + * nm.c (print_symname): Replace _bfd_elf_get_symbol_version_name + with bfd_get_symbol_version_string. + (print_symbo): Pass TRUE to bfd_get_symbol_version_string. + * objdump.c (objdump_print_symname): Likewise. + +2020-03-24 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/25708 * nm.c (SYM_NAME): Removed. (print_symname): Add a pointer to struct extended_symbol_info argument. Call _bfd_elf_get_symbol_version_name to get symbol diff --git a/binutils/nm.c b/binutils/nm.c index 0e475f8..1b5122d 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -417,9 +417,8 @@ print_symname (const char *form, struct extended_symbol_info *info, bfd_boolean hidden; version_string - = _bfd_elf_get_symbol_version_name (abfd, - &info->elfinfo->symbol, - FALSE, &hidden); + = bfd_get_symbol_version_string (abfd, &info->elfinfo->symbol, + FALSE, &hidden); if (version_string && version_string[0]) printf ("%s%s", hidden ? "@" : "@@", version_string); } @@ -908,7 +907,8 @@ print_symbol (bfd * abfd, bfd_boolean hidden = FALSE; if ((sym->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0) - version_string = bfd_get_symbol_version_string (abfd, sym, &hidden); + version_string = bfd_get_symbol_version_string (abfd, sym, + TRUE, &hidden); if (bfd_is_und_section (bfd_asymbol_section (sym))) hidden = TRUE; diff --git a/binutils/objdump.c b/binutils/objdump.c index 211be92..81c0b4f 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1031,7 +1031,8 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *inf, } if ((sym->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0) - version_string = bfd_get_symbol_version_string (abfd, sym, &hidden); + version_string = bfd_get_symbol_version_string (abfd, sym, TRUE, + &hidden); if (bfd_is_und_section (bfd_asymbol_section (sym))) hidden = TRUE; |