Use get_symbol_version_string in BFD_JUMP_TABLE_SYMBOLS
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 25 Nov 2014 17:28:32 +0000 (09:28 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 25 Nov 2014 17:28:32 +0000 (09:28 -0800)
This patch adds get_symbol_version_string to BFD_JUMP_TABLE_SYMBOLS so
that we can use bfd_get_symbol_version_string in objdump for non-ELF
targets.

bfd/

* 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.

binutils/

* objdump.c (objdump_print_symname): Replace
bfd_elf_get_symbol_version_string with
bfd_get_symbol_version_string.

37 files changed:
bfd/ChangeLog
bfd/aout-adobe.c
bfd/aout-target.h
bfd/aout-tic30.c
bfd/bfd-in2.h
bfd/binary.c
bfd/bout.c
bfd/coff-rs6000.c
bfd/coff64-rs6000.c
bfd/elf-bfd.h
bfd/elf.c
bfd/elfxx-target.h
bfd/i386msdos.c
bfd/i386os9k.c
bfd/ieee.c
bfd/ihex.c
bfd/libbfd-in.h
bfd/libbfd.h
bfd/libcoff-in.h
bfd/libcoff.h
bfd/libecoff.h
bfd/mach-o-target.c
bfd/mmo.c
bfd/nlm-target.h
bfd/oasys.c
bfd/pef.c
bfd/plugin.c
bfd/ppcboot.c
bfd/som.c
bfd/srec.c
bfd/targets.c
bfd/tekhex.c
bfd/versados.c
bfd/vms-alpha.c
bfd/xsym.c
binutils/ChangeLog
binutils/objdump.c

index 7b3971e2352bb3dece87c4853117db5fe074acda..54942a1b0a75fd236235cc7e4b489f0a9e08ddaf 100644 (file)
@@ -1,3 +1,50 @@
+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
index cfdcc645ba64b3871d3d6543a9bfb23fd91e9bdd..50394a2c90dd6e8ec7ceef6bea2d3c2ebe0cdba2 100644 (file)
@@ -447,6 +447,7 @@ aout_adobe_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED,
 /* 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
index 3bca8b550ff3f9dab83af629a674513f2fa14b6b..7982bf0b1c19fc40a82b6c1db9dc7b069bb77408 100644 (file)
@@ -459,6 +459,10 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
 #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
index e74464d52e79d827c7eea08727c142d0880b4cb7..e164446566cdc80692fc61b35de3b6fda8d2c7a5 100644 (file)
@@ -917,6 +917,10 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #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
index 433b171d294f51333166efb7ace3c0939365612a..ed7be291b87a6f07079ba6194b5c132a0c3eb93b 100644 (file)
@@ -7015,6 +7015,7 @@ typedef struct bfd_target
   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, \
@@ -7036,6 +7037,9 @@ typedef struct bfd_target
   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 *);
index d35e859f6dbde28f85b2726ccb753f23eedbb920..93a0cff56f7a869748bbe802442769422f3c769b 100644 (file)
@@ -190,6 +190,8 @@ binary_canonicalize_symtab (bfd *abfd, asymbol **alocation)
 
 #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.  */
 
index a27df583b1a655ea4eda23ae0c5d87cf4b6ae625..de9c7c718ab03bc47a16075ca3a48ef131de5c5b 100644 (file)
@@ -1375,6 +1375,7 @@ b_out_bfd_get_relocated_section_contents (bfd *output_bfd,
 /* 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
index fea5f3bc5e420f0ba2b2841dcdf9573b370d64ae..05c45cf14bf7af7ff29dc8ae2638571818b5ca2f 100644 (file)
@@ -4008,6 +4008,8 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
 #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
index 5985d817d9a0fa06bdb00a8b4e71c77feb44ce43..72ea58bebbe182a2004e4542eff3f2cd5aa02726 100644 (file)
@@ -2712,6 +2712,7 @@ const bfd_target rs6000_xcoff64_vec =
     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,
@@ -2969,6 +2970,7 @@ const bfd_target rs6000_xcoff64_aix_vec =
     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,
index bee0ea167b00287a96bc0d0725b7ca1f42f29100..43686584e53e6b542ce646daa080e5da25fcf876 100644 (file)
@@ -1772,7 +1772,7 @@ extern bfd_boolean _bfd_elf_copy_private_bfd_data
   (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);
index c0c7fef83309bce490cf80466d75aadaf9a18f81..0cf19918d3450be84088a55af0e5ddb9c03b3590 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1425,8 +1425,8 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
 /* 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
@@ -1522,9 +1522,9 @@ bfd_elf_print_symbol (bfd *abfd,
        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)
index 692fb46524af5b6ac428ef930441aeede41f9398..9bf4b18f7b11f6134016a231fef578648be0a898 100644 (file)
 #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
index f02659fb49c3865a1fca42cb9f0421da05dbccb4..bd2730a705a0f66856f8764cce70121e07978d7c 100644 (file)
@@ -162,6 +162,8 @@ msdos_set_section_contents (bfd *abfd,
 #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
index d8d540891599a28fe157482ac63ac8e2413d51f8..a8f87e53ce6e66c278a4dc40046b5ce9d50aadb9 100644 (file)
@@ -155,6 +155,8 @@ os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 #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
index 70ce4c5cc0568c37bfd7d33fe62b995cb8cbcd8f..04ac66611ba7009cb38cdfe8b649fdfa80b3e414 100644 (file)
@@ -3828,6 +3828,8 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 #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
index 9b3b81387984019b424b10883235eab9fdbafe9a..7ce8c4bcb719fb598266c71757f046c28416b341 100644 (file)
@@ -918,6 +918,7 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 #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
index 50a46ac4d261ab8addef375eb523877e679b5434..f51bc1142dd36b057f0a1b2c8f3e467837ad21a4 100644 (file)
@@ -392,6 +392,8 @@ extern bfd_boolean _bfd_vms_lib_ia64_mkarchive (bfd *abfd);
   ((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 \
index 6c48f82a5db8c9a7dee8b605f0cd627542147d6e..a1923c82fb7ffb177fc6a1df3738b41cb0fc6216 100644 (file)
@@ -397,6 +397,8 @@ extern bfd_boolean _bfd_vms_lib_ia64_mkarchive (bfd *abfd);
   ((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 \
index 6b6eb287e42789fb4b4e6341da4aace6e257ce91..dc7866d6a217e3b0318515301ebcf390b4116234 100644 (file)
@@ -353,6 +353,8 @@ extern void coff_print_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
index 947998570baaae85d13fe14e50416bf349d92c51..d1c466a6d61de0d15a5c0c142c5ed7d47fd80290 100644 (file)
@@ -357,6 +357,8 @@ extern void coff_print_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
index 06434c27e0dcd0594c99dc87be9a66151cb12726..ebfa37e24811110a9b04d262dc8116c34d98c48b 100644 (file)
@@ -285,6 +285,8 @@ extern void _bfd_ecoff_print_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
index a070e677ebdec6fd902e5c2a3edf3522a4e991d8..dd1ced1ddffa65ac7d44ecdee294d7f63d4ba95e 100644 (file)
@@ -31,6 +31,7 @@
 #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
index 2c74c764fc0879fb3621ca9f9ed6b7b65bf5bf86..698ffa5d5556083fb49bb681ce0e14852d2b2abd 100644 (file)
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -3204,6 +3204,9 @@ mmo_write_object_contents (bfd *abfd)
 #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
 
index 2343cff1d957b3f14e19f80d2a3a80969f6c4034..44b41ed65c9cbbef291eca7411402ecde3f7f540 100644 (file)
@@ -25,6 +25,7 @@
 #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
index 9ff9b9e536fd9d41874259059de9af79a1dbc348..9ff9117b72df37f76587789d624c63f1f6547a91 100644 (file)
@@ -1170,6 +1170,7 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 #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
index 4c294173b985ea4f29f309d9a75e0308c1589f49..363e6416e79b0a0ae1fc92915ce0f4a44e7526f8 100644 (file)
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -43,6 +43,7 @@
 #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
index a068861641c2bac17a5234eb5aebcb5571dafd23..7f8f8b53d372d5a8d7c052753d3d10bd02b5488b 100644 (file)
@@ -85,6 +85,7 @@ dlerror (void)
 #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
index 9ee8ab5d9b8ac210b6611ee8b52d4ba1a9627685..7599e20ee0883ae3baf399a88cf6304cbb128a7a 100644 (file)
@@ -326,6 +326,8 @@ ppcboot_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
   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
index 513e4fa6049874e866e4b9e2212de802fbe557b1..5f96caa64ae908c381ca3a38742268f07dbc3a00 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -6718,6 +6718,7 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
 }
 
 #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
index 5f9a54624ee5200eec7bd1735a83562696f651ff..8de6e425cb8ad4d86bad4bd83bdaa0a9e203d5ee 100644 (file)
@@ -1258,6 +1258,7 @@ srec_print_symbol (bfd *abfd,
 #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
index 8323e9256a12cfd689b18f243e29d7832a9579e1..6a282ea2e1247a16831d32482c19b061a3011423 100644 (file)
@@ -363,6 +363,7 @@ BFD_JUMP_TABLE macros.
 .  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, \
@@ -384,6 +385,9 @@ BFD_JUMP_TABLE macros.
 .  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 *);
index 0328689c85492713e2c6aac39b8882576a6fe757..2f14194833cbe5fdfa49d61965baf1bb895ea8fe 100644 (file)
@@ -957,6 +957,7 @@ tekhex_print_symbol (bfd *abfd,
 #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
index 5bafcb1d7cd8528bb638d57dab9e956cc2c3baab..236899822c32ab85b497bb5785e96e979523ed47 100644 (file)
@@ -811,6 +811,7 @@ versados_canonicalize_reloc (bfd *abfd,
 #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
index 3789f794de5b4014cb7e976adf532fc0abd765fe..8c24ef0c28171c25283ac5bb890aad0be93a0ebb 100644 (file)
@@ -9191,6 +9191,9 @@ bfd_vms_get_data (bfd *abfd)
    ((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
index 4e2a8ab3deee4e1a94bc05f7280b91872c7487fb..870795ea2ba17aaff2ae30e7ca0dfc89ea5faa54 100644 (file)
@@ -35,6 +35,7 @@
 #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
index f4d9aa63f4d6f9301bf03671347ee0bb3fef9c67..86c8555b5347a653bcb855aca9e0093b01edae43 100644 (file)
@@ -1,3 +1,9 @@
+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
index e04c3eea8fb503fbacc75854aae5d2dfa1b456bd..fdfa60250c2c4ddc035e4003bae9e27202407a01 100644 (file)
@@ -808,9 +808,7 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *inf,
        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;