+2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ 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.
+
2020-03-24 Nick Clifton <nickc@redhat.com>
Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
#define bfd_get_symbol_info(b,p,e) \
BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
+ bfd_boolean,
bfd_boolean *);
-#define bfd_get_symbol_version_string(b,s,h) \
- BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
+#define bfd_get_symbol_version_string(b,s,p,h) \
+ BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h))
bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
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);
and return symbol version for symbol version itself. */
const char *
-_bfd_elf_get_symbol_version_name (bfd *abfd, asymbol *symbol,
- bfd_boolean base_p,
- bfd_boolean *hidden)
+_bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
+ bfd_boolean base_p,
+ bfd_boolean *hidden)
{
const char *version_string = NULL;
if (elf_dynversym (abfd) != 0
return version_string;
}
-/* Get version string. */
-
-const char *
-_bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
- bfd_boolean *hidden)
-{
- return _bfd_elf_get_symbol_version_name (abfd, symbol, TRUE, hidden);
-}
-
/* Display ELF-specific fields of a symbol. */
void
/* If we have version information, print it. */
version_string = _bfd_elf_get_symbol_version_string (abfd,
symbol,
+ TRUE,
&hidden);
if (version_string)
{
extern void _bfd_nosymbols_get_symbol_info
(bfd *, asymbol *, symbol_info *) ATTRIBUTE_HIDDEN;
extern const char * _bfd_nosymbols_get_symbol_version_string
- (bfd *, asymbol *, bfd_boolean *) ATTRIBUTE_HIDDEN;
+ (bfd *, asymbol *, bfd_boolean, bfd_boolean *) ATTRIBUTE_HIDDEN;
extern bfd_boolean _bfd_nosymbols_bfd_is_local_label_name
(bfd *, const char *) ATTRIBUTE_HIDDEN;
#define _bfd_nosymbols_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
extern void _bfd_nosymbols_get_symbol_info
(bfd *, asymbol *, symbol_info *) ATTRIBUTE_HIDDEN;
extern const char * _bfd_nosymbols_get_symbol_version_string
- (bfd *, asymbol *, bfd_boolean *) ATTRIBUTE_HIDDEN;
+ (bfd *, asymbol *, bfd_boolean, bfd_boolean *) ATTRIBUTE_HIDDEN;
extern bfd_boolean _bfd_nosymbols_bfd_is_local_label_name
(bfd *, const char *) ATTRIBUTE_HIDDEN;
#define _bfd_nosymbols_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
const char *
_bfd_nosymbols_get_symbol_version_string (bfd *abfd,
asymbol *symbol ATTRIBUTE_UNUSED,
+ bfd_boolean base_p ATTRIBUTE_UNUSED,
bfd_boolean *hidden ATTRIBUTE_UNUSED)
{
return (const char *) _bfd_ptr_bfd_null_error (abfd);
.#define bfd_get_symbol_info(b,p,e) \
. BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
. const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
+. bfd_boolean,
. bfd_boolean *);
-.#define bfd_get_symbol_version_string(b,s,h) \
-. BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
+.#define bfd_get_symbol_version_string(b,s,p,h) \
+. BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h))
. bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
. bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
. alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
+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
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);
}
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;
}
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;