+2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use
+ NAME##_get_symbol_version_string.
+ (bfd_get_symbol_version_string): New.
+ * aout-adobe.c (aout_32_get_symbol_version_string): Define using
+ _bfd_nosymbols define.
+ * aout-target.h (MY_get_symbol_version_string): Likewise.
+ * aout-tic30.c (MY_get_symbol_version_string): Likewise.
+ * binary.c (binary_get_symbol_version_string): Likewise.
+ * bout.c (aout_32_get_symbol_version_string): Likewise.
+ * coff-rs6000.c (_bfd_xcoff_get_symbol_version_string): Likewise.
+ * i386msdos.c (msdos_get_symbol_version_string): Likewise.
+ * i386os9k.c (aout_32_get_symbol_version_string): Likewise.
+ * ieee.c (ieee_get_symbol_version_string): Likewise.
+ * ihex.c (ihex_get_symbol_version_string): Likewise.
+ * libecoff.h (_bfd_ecoff_get_symbol_version_string): Likewise.
+ * mach-o-target.c (bfd_mach_o_get_symbol_version_string): Likewise.
+ * mmo.c (mmo_get_symbol_version_string): Likewise.
+ * nlm-target.h (nlm_get_symbol_version_string): Likewise.
+ * oasys.c (oasys_get_symbol_version_string): Likewise.
+ * pef.c (bfd_pef_get_symbol_version_string): Likewise.
+ * plugin.c (bfd_plugin_get_symbol_version_string): Likewise.
+ * ppcboot.c (ppcboot_get_symbol_version_string): Likewise.
+ * som.c (som_get_symbol_version_string): Likewise.
+ * srec.c (srec_get_symbol_version_string): Likewise.
+ * tekhex.c (tekhex_get_symbol_version_string): Likewise.
+ * versados.c (versados_get_symbol_version_string): Likewise.
+ * vms-alpha.c (alpha_vms_get_symbol_version_string): Likewise.
+ * xsym.c (bfd_sym_get_symbol_version_string): Likewise.
+
+ * coff64-rs6000.c (rs6000_xcoff64_vec): Use
+ coff_get_symbol_version_string.
+ (rs6000_xcoff64_aix_vec): Likewise.
+
+ * elf-bfd.h (bfd_elf_get_symbol_version_string): Renamed to ...
+ (_bfd_elf_get_symbol_version_string): This.
+ * elf.c: Likewise.
+ (bfd_elf_print_symbol): Updated.
+ * elfxx-target.h (bfd_elfNN_get_symbol_version_string): Define.
+
+ * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Define.
+ * libcoff-in.h (coff_get_symbol_version_string): Likewise.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Likewise.
+ * libcoff.h: Likewise.
+
2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/16496
/* Build the transfer vector for Adobe A.Out files. */
#define aout_32_find_line _bfd_nosymbols_find_line
+#define aout_32_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define aout_32_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#define aout_32_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
#ifndef MY_get_symbol_info
#define MY_get_symbol_info NAME (aout, get_symbol_info)
#endif
+#ifndef MY_get_symbol_version_string
+#define MY_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
+#endif
#ifndef MY_get_lineno
#define MY_get_lineno NAME (aout, get_lineno)
#endif
#ifndef MY_get_symbol_info
#define MY_get_symbol_info NAME (aout, get_symbol_info)
#endif
+#ifndef MY_get_symbol_version_string
+#define MY_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
+#endif
#ifndef MY_get_lineno
#define MY_get_lineno NAME (aout, get_lineno)
#endif
NAME##_make_empty_symbol, \
NAME##_print_symbol, \
NAME##_get_symbol_info, \
+ NAME##_get_symbol_version_string, \
NAME##_bfd_is_local_label_name, \
NAME##_bfd_is_target_special_symbol, \
NAME##_get_lineno, \
void (*_bfd_get_symbol_info)
(bfd *, struct bfd_symbol *, symbol_info *);
#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 *);
+#define bfd_get_symbol_version_string(b,s,h) BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,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 *);
#define binary_make_empty_symbol _bfd_generic_make_empty_symbol
#define binary_print_symbol _bfd_nosymbols_print_symbol
+#define binary_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
/* Get information about a symbol. */
/* Build the transfer vectors for Big and Little-Endian B.OUT files. */
#define aout_32_find_line _bfd_nosymbols_find_line
+#define aout_32_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
#define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define _bfd_xcoff_make_empty_symbol coff_make_empty_symbol
#define _bfd_xcoff_print_symbol coff_print_symbol
#define _bfd_xcoff_get_symbol_info coff_get_symbol_info
+#define _bfd_xcoff_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
#define _bfd_xcoff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name
#define _bfd_xcoff_bfd_is_target_special_symbol \
coff_bfd_is_target_special_symbol
coff_make_empty_symbol,
coff_print_symbol,
coff_get_symbol_info,
+ coff_get_symbol_version_string,
_bfd_xcoff_is_local_label_name,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_make_empty_symbol,
coff_print_symbol,
coff_get_symbol_info,
+ coff_get_symbol_version_string,
_bfd_xcoff_is_local_label_name,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
(bfd *, bfd *);
extern bfd_boolean _bfd_elf_print_private_bfd_data
(bfd *, void *);
-const char * bfd_elf_get_symbol_version_string
+const char * _bfd_elf_get_symbol_version_string
(bfd *, asymbol *, bfd_boolean *);
extern void bfd_elf_print_symbol
(bfd *, void *, asymbol *, bfd_print_symbol_type);
/* Get version string. */
const char *
-bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
- bfd_boolean *hidden)
+_bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
+ bfd_boolean *hidden)
{
const char *version_string = NULL;
if (elf_dynversym (abfd) != 0
bfd_fprintf_vma (abfd, file, val);
/* If we have version information, print it. */
- version_string = bfd_elf_get_symbol_version_string (abfd,
- symbol,
- &hidden);
+ version_string = _bfd_elf_get_symbol_version_string (abfd,
+ symbol,
+ &hidden);
if (version_string)
{
if (!hidden)
#ifndef bfd_elfNN_get_symbol_info
#define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info
#endif
+#ifndef bfd_elfNN_get_symbol_version_string
+#define bfd_elfNN_get_symbol_version_string \
+ _bfd_elf_get_symbol_version_string
+#endif
#define bfd_elfNN_canonicalize_symtab _bfd_elf_canonicalize_symtab
#define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
#define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol
#define msdos_canonicalize_symtab _bfd_nosymbols_canonicalize_symtab
#define msdos_print_symbol _bfd_nosymbols_print_symbol
#define msdos_get_symbol_info _bfd_nosymbols_get_symbol_info
+#define msdos_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
#define msdos_find_nearest_line _bfd_nosymbols_find_nearest_line
#define msdos_find_line _bfd_nosymbols_find_line
#define msdos_find_inliner_info _bfd_nosymbols_find_inliner_info
#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
#define aout_32_find_line _bfd_nosymbols_find_line
+#define aout_32_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define aout_32_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#define ieee_update_armap_timestamp bfd_true
#define ieee_get_elt_at_index _bfd_generic_get_elt_at_index
+#define ieee_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
#define ieee_bfd_is_target_special_symbol \
((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define ieee_bfd_is_local_label_name bfd_generic_is_local_label_name
#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
#define ihex_print_symbol _bfd_nosymbols_print_symbol
#define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
+#define ihex_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define ihex_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
#define ihex_get_lineno _bfd_nosymbols_get_lineno
((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) bfd_void)
#define _bfd_nosymbols_get_symbol_info \
((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
+#define _bfd_nosymbols_get_symbol_version_string \
+ ((const char *(*) (bfd *, asymbol *, bfd_boolean *)) bfd_nullvoidptr)
#define _bfd_nosymbols_bfd_is_local_label_name \
((bfd_boolean (*) (bfd *, const char *)) bfd_false)
#define _bfd_nosymbols_bfd_is_target_special_symbol \
((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) bfd_void)
#define _bfd_nosymbols_get_symbol_info \
((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
+#define _bfd_nosymbols_get_symbol_version_string \
+ ((const char *(*) (bfd *, asymbol *, bfd_boolean *)) bfd_nullvoidptr)
#define _bfd_nosymbols_bfd_is_local_label_name \
((bfd_boolean (*) (bfd *, const char *)) bfd_false)
#define _bfd_nosymbols_bfd_is_target_special_symbol \
(bfd *, void * filep, asymbol *, bfd_print_symbol_type);
extern void coff_get_symbol_info
(bfd *, asymbol *, symbol_info *ret);
+#define coff_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
extern bfd_boolean _bfd_coff_is_local_label_name
(bfd *, const char *);
extern asymbol *coff_bfd_make_debug_symbol
(bfd *, void * filep, asymbol *, bfd_print_symbol_type);
extern void coff_get_symbol_info
(bfd *, asymbol *, symbol_info *ret);
+#define coff_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
extern bfd_boolean _bfd_coff_is_local_label_name
(bfd *, const char *);
extern asymbol *coff_bfd_make_debug_symbol
(bfd *, void *, asymbol *, bfd_print_symbol_type);
extern void _bfd_ecoff_get_symbol_info
(bfd *, asymbol *, symbol_info *);
+#define _bfd_ecoff_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
extern bfd_boolean _bfd_ecoff_bfd_is_local_label_name
(bfd *, const char *);
#define _bfd_ecoff_get_lineno _bfd_nosymbols_get_lineno
#define bfd_mach_o_bfd_is_local_label_name bfd_generic_is_local_label_name
#define bfd_mach_o_get_lineno _bfd_nosymbols_get_lineno
#define bfd_mach_o_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define bfd_mach_o_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define bfd_mach_o_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_mach_o_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_mach_o_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define mmo_bfd_is_target_special_symbol \
((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#define mmo_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
+
/* Is this one really used or defined by anyone? */
#define mmo_get_lineno _bfd_nosymbols_get_lineno
#define nlm_make_empty_symbol nlmNAME (make_empty_symbol)
#define nlm_print_symbol nlmNAME (print_symbol)
#define nlm_get_symbol_info nlmNAME (get_symbol_info)
+#define nlm_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define nlm_bfd_is_local_label_name bfd_generic_is_local_label_name
#define nlm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define nlm_get_lineno _bfd_nosymbols_get_lineno
#define oasys_bfd_is_local_label_name bfd_generic_is_local_label_name
#define oasys_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define oasys_get_lineno _bfd_nosymbols_get_lineno
+#define oasys_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define oasys_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define oasys_read_minisymbols _bfd_generic_read_minisymbols
#define oasys_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
#define bfd_pef_find_line _bfd_nosymbols_find_line
#define bfd_pef_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define bfd_pef_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_pef_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define bfd_plugin_find_nearest_line _bfd_nosymbols_find_nearest_line
#define bfd_plugin_find_line _bfd_nosymbols_find_line
#define bfd_plugin_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define bfd_plugin_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define bfd_plugin_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_plugin_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_plugin_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
bfd_symbol_info (symbol, ret);
}
+#define ppcboot_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
#define ppcboot_bfd_is_target_special_symbol \
((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name
}
#define som_find_line _bfd_nosymbols_find_line
+#define som_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define som_close_and_cleanup som_bfd_free_cached_info
#define som_read_ar_hdr _bfd_generic_read_ar_hdr
#define som_write_ar_hdr _bfd_generic_write_ar_hdr
#define srec_find_line _bfd_nosymbols_find_line
#define srec_find_inliner_info _bfd_nosymbols_find_inliner_info
#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
+#define srec_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define srec_read_minisymbols _bfd_generic_read_minisymbols
#define srec_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
. NAME##_make_empty_symbol, \
. NAME##_print_symbol, \
. NAME##_get_symbol_info, \
+. NAME##_get_symbol_version_string, \
. NAME##_bfd_is_local_label_name, \
. NAME##_bfd_is_target_special_symbol, \
. NAME##_get_lineno, \
. void (*_bfd_get_symbol_info)
. (bfd *, struct bfd_symbol *, symbol_info *);
.#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 *);
+.#define bfd_get_symbol_version_string(b,s,h) BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,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 *);
#define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line
#define tekhex_find_line _bfd_nosymbols_find_line
#define tekhex_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define tekhex_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define tekhex_read_minisymbols _bfd_generic_read_minisymbols
#define tekhex_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define versados_find_nearest_line _bfd_nosymbols_find_nearest_line
#define versados_find_line _bfd_nosymbols_find_line
#define versados_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define versados_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define versados_make_empty_symbol _bfd_generic_make_empty_symbol
#define versados_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define versados_read_minisymbols _bfd_generic_read_minisymbols
((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define alpha_vms_print_symbol vms_print_symbol
#define alpha_vms_get_symbol_info vms_get_symbol_info
+#define alpha_vms_get_symbol_version_string \
+ _bfd_nosymbols_get_symbol_version_string
+
#define alpha_vms_read_minisymbols _bfd_generic_read_minisymbols
#define alpha_vms_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define alpha_vms_get_lineno _bfd_nosymbols_get_lineno
#define bfd_sym_find_nearest_line _bfd_nosymbols_find_nearest_line
#define bfd_sym_find_line _bfd_nosymbols_find_line
#define bfd_sym_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define bfd_sym_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define bfd_sym_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_sym_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_sym_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * objdump.c (objdump_print_symname): Replace
+ bfd_elf_get_symbol_version_string with
+ bfd_get_symbol_version_string.
+
2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/16496
name = alloc;
}
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- version_string = bfd_elf_get_symbol_version_string (abfd, sym,
- &hidden);
+ version_string = bfd_get_symbol_version_string (abfd, sym, &hidden);
if (bfd_is_und_section (bfd_get_section (sym)))
hidden = TRUE;