From 7e6e972f74aeac0ebdbd95a7f905d871cd2581de Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 24 Mar 2020 04:23:11 -0700 Subject: bfd: Display symbol version for nm -D Extend _bfd_elf_get_symbol_version_string for nm -D to display symbol version. _bfd_elf_get_symbol_version_name is added to avoid updating all XXX_get_symbol_version_string functions. bfd/ PR binutils/25708 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New. * elf.c (_bfd_elf_get_symbol_version_name): New function. Based on the previous _bfd_elf_get_symbol_version_string. (_bfd_elf_get_symbol_version_string): Use it. binutils/ 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 version. (print_symdef_entry): Pass NULL to print_symname. (print_symbol_info_bsd): Update call to print_symname. (print_symbol_info_sysv): Likewise. (print_symbol_info_posix): Likewise. ld/ PR binutils/25708 * testsuite/ld-elf/pr25708.d: New file. --- bfd/elf-bfd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bfd/elf-bfd.h') diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index d4ac515..c546b58 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -2078,6 +2078,8 @@ extern bfd_boolean _bfd_elf_print_private_bfd_data (bfd *, void *); const char * _bfd_elf_get_symbol_version_string (bfd *, asymbol *, bfd_boolean *); +const char * _bfd_elf_get_symbol_version_name + (bfd *, asymbol *, bfd_boolean, bfd_boolean *); extern void bfd_elf_print_symbol (bfd *, void *, asymbol *, bfd_print_symbol_type); -- cgit v1.1