]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* linker.c (bfd_link_hash_traverse): Follow warning symbol link.
authorAlan Modra <amodra@gmail.com>
Mon, 13 Jun 2011 00:59:15 +0000 (00:59 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 13 Jun 2011 00:59:15 +0000 (00:59 +0000)
(_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
warning symbols here.
* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
* elf32-arm.c (allocate_dynrelocs_for_symbol,
elf32_arm_readonly_dynrelocs): Likewise.
* elf32-bfin.c (bfin_discard_copies): Likewise.
* elf32-cris.c (elf_cris_adjust_gotplt_to_got,
elf_cris_discard_excess_dso_dynamics,
elf_cris_discard_excess_program_dynamics): Likewise.
* elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
clobber_millicode_symbols, readonly_dynrelocs): Likewise.
* elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
* elf32-i386.c (elf_i386_allocate_dynrelocs,
elf_i386_readonly_dynrelocs): Likewise.
* elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
* elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
* elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
* elf32-m68k.c (elf_m68k_discard_copies): Likewise.
* elf32-microblaze.c (allocate_dynrelocs): Likewise.
* elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
* elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
* elf32-score.c (score_elf_sort_hash_table_f): Likewise.
* elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
* elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
* elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
elf32_tic6x_readonly_dynrelocs): Likewise.
* elf32-vax.c (elf_vax_discard_copies): Likewise.
* elf32-xstormy16.c (xstormy16_relax_plt_check,
xstormy16_relax_plt_realloc): Likewise.
* elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
* elf64-alpha.c (elf64_alpha_output_extsym,
elf64_alpha_calc_got_offsets_for_symbol,
elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
* elf64-hppa.c (elf64_hppa_mark_exported_functions,
allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
elf_hppa_unmark_useless_dynamic_symbols,
elf_hppa_remark_useless_dynamic_symbols): Likewise.
* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
readonly_dynrelocs, merge_global_got, reallocate_got,
undo_symbol_twiddle): Likewise.
* elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
* elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
elf_x86_64_readonly_dynrelocs): Likewise.
* elflink.c (elf_link_renumber_hash_table_dynsyms,
elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
_bfd_elf_link_find_version_dependencies,
_bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
_bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
elf_collect_hash_codes, elf_collect_gnu_hash_codes,
elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
elf_gc_propagate_vtable_entries_used,
elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
elf_gc_allocate_got_offsets): Likewise.
* elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
elfNN_ia64_global_dyn_sym_thunk): Likewise.
* elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
* elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
* i386linux.c (linux_tally_symbols): Likewise.
* m68klinux.c (linux_tally_symbols): Likewise.
* sparclinux.c (linux_tally_symbols): Likewise.
* sunos.c (sunos_scan_dynamic_symbol): Likewise.
* xcofflink.c (xcoff_post_gc_symbol): Likewise.

* elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
function.  Update all callers.
* aoutx.h (aout_link_write_other_symbol): Likewise.
* pdp11.c (aout_link_write_other_symbol): Likewise.
* cofflink.c (_bfd_coff_write_global_sym): Likewise.
* ecoff.c (ecoff_link_write_external): Likewise.
* xcofflink.c (xcoff_write_global_symbol): Likewise.
* vms-alpha.c (alpha_vms_link_output_symbol): Likewise.  Handle
warning symbols.
* ecoff.c (ecoff_link_hash_traverse): Delete.
* coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
_bfd_coff_write_global_sym.
* libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
* libcoff.h: Regenerate.

46 files changed:
bfd/ChangeLog
bfd/aoutx.h
bfd/coff-ppc.c
bfd/cofflink.c
bfd/ecoff.c
bfd/elf-m10300.c
bfd/elf32-arm.c
bfd/elf32-bfin.c
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68k.c
bfd/elf32-microblaze.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-tic6x.c
bfd/elf32-vax.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/i386linux.c
bfd/libcoff-in.h
bfd/libcoff.h
bfd/linker.c
bfd/m68klinux.c
bfd/pdp11.c
bfd/sparclinux.c
bfd/sunos.c
bfd/vms-alpha.c
bfd/xcofflink.c

index 1e72bf2d86d1d62a3eac62e51cdcff28c6f3cdea..95d7ab2b7d70aa84cd38542d7bd5726f27839bbb 100644 (file)
@@ -1,3 +1,87 @@
+2011-06-13  Alan Modra  <amodra@gmail.com>
+
+       * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
+       (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
+       warning symbols here.
+       * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
+       * elf32-arm.c (allocate_dynrelocs_for_symbol,
+       elf32_arm_readonly_dynrelocs): Likewise.
+       * elf32-bfin.c (bfin_discard_copies): Likewise.
+       * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
+       elf_cris_discard_excess_dso_dynamics,
+       elf_cris_discard_excess_program_dynamics): Likewise.
+       * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
+       clobber_millicode_symbols, readonly_dynrelocs): Likewise.
+       * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
+       * elf32-i386.c (elf_i386_allocate_dynrelocs,
+       elf_i386_readonly_dynrelocs): Likewise.
+       * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+       * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
+       * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+       * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
+       * elf32-microblaze.c (allocate_dynrelocs): Likewise.
+       * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
+       * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+       * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
+       * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
+       * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
+       elf32_tic6x_readonly_dynrelocs): Likewise.
+       * elf32-vax.c (elf_vax_discard_copies): Likewise.
+       * elf32-xstormy16.c (xstormy16_relax_plt_check,
+       xstormy16_relax_plt_realloc): Likewise.
+       * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
+       * elf64-alpha.c (elf64_alpha_output_extsym,
+       elf64_alpha_calc_got_offsets_for_symbol,
+       elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
+       * elf64-hppa.c (elf64_hppa_mark_exported_functions,
+       allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
+       elf_hppa_unmark_useless_dynamic_symbols,
+       elf_hppa_remark_useless_dynamic_symbols): Likewise.
+       * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
+       adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
+       readonly_dynrelocs, merge_global_got, reallocate_got,
+       undo_symbol_twiddle): Likewise.
+       * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+       * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
+       * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
+       elf_x86_64_readonly_dynrelocs): Likewise.
+       * elflink.c (elf_link_renumber_hash_table_dynsyms,
+       elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
+       _bfd_elf_link_find_version_dependencies,
+       _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
+       _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
+       elf_collect_hash_codes, elf_collect_gnu_hash_codes,
+       elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
+       elf_gc_propagate_vtable_entries_used,
+       elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
+       elf_gc_allocate_got_offsets): Likewise.
+       * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
+       elfNN_ia64_global_dyn_sym_thunk): Likewise.
+       * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
+       mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
+       * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+       * i386linux.c (linux_tally_symbols): Likewise.
+       * m68klinux.c (linux_tally_symbols): Likewise.
+       * sparclinux.c (linux_tally_symbols): Likewise.
+       * sunos.c (sunos_scan_dynamic_symbol): Likewise.
+       * xcofflink.c (xcoff_post_gc_symbol): Likewise.
+
+       * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
+       function.  Update all callers.
+       * aoutx.h (aout_link_write_other_symbol): Likewise.
+       * pdp11.c (aout_link_write_other_symbol): Likewise.
+       * cofflink.c (_bfd_coff_write_global_sym): Likewise.
+       * ecoff.c (ecoff_link_write_external): Likewise.
+       * xcofflink.c (xcoff_write_global_symbol): Likewise.
+       * vms-alpha.c (alpha_vms_link_output_symbol): Likewise.  Handle
+       warning symbols.
+       * ecoff.c (ecoff_link_hash_traverse): Delete.
+       * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
+       _bfd_coff_write_global_sym.
+       * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
+       * libcoff.h: Regenerate.
+
 2011-06-10  Nick Clifton  <nickc@redhat.com>
 
        * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
 2011-06-10  Nick Clifton  <nickc@redhat.com>
 
        * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
index ec0bdf0326ab13830be86626d80e973fe62084f7..1efb71512058620e7f9ada36852886b72052b716 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD semi-generic back-end for a.out binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 /* BFD semi-generic back-end for a.out binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -3551,8 +3551,9 @@ aout_link_includes_newfunc (struct bfd_hash_entry *entry,
    object.  */
 
 static bfd_boolean
    object.  */
 
 static bfd_boolean
-aout_link_write_other_symbol (struct aout_link_hash_entry *h, void * data)
+aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data)
 {
 {
+  struct aout_link_hash_entry *h = (struct aout_link_hash_entry *) bh;
   struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
   bfd *output_bfd;
   int type;
   struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
   bfd *output_bfd;
   int type;
@@ -3719,7 +3720,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *finfo,
             symbol.  */
          h->indx = -2;
          h->written = FALSE;
             symbol.  */
          h->indx = -2;
          h->written = FALSE;
-         if (! aout_link_write_other_symbol (h, (void *) finfo))
+         if (!aout_link_write_other_symbol (&h->root.root, finfo))
            return FALSE;
          r_index = h->indx;
        }
            return FALSE;
          r_index = h->indx;
        }
@@ -4077,8 +4078,8 @@ aout_link_input_section_std (struct aout_final_link_info *finfo,
                            {
                              h->indx = -2;
                              h->written = FALSE;
                            {
                              h->indx = -2;
                              h->written = FALSE;
-                             if (! aout_link_write_other_symbol (h,
-                                                                 (void *) finfo))
+                             if (!aout_link_write_other_symbol (&h->root.root,
+                                                                finfo))
                                return FALSE;
                            }
                          r_index = h->indx;
                                return FALSE;
                            }
                          r_index = h->indx;
@@ -4419,8 +4420,8 @@ aout_link_input_section_ext (struct aout_final_link_info *finfo,
                            {
                              h->indx = -2;
                              h->written = FALSE;
                            {
                              h->indx = -2;
                              h->written = FALSE;
-                             if (! aout_link_write_other_symbol (h,
-                                                                 (void *) finfo))
+                             if (!aout_link_write_other_symbol (&h->root.root,
+                                                                finfo))
                                return FALSE;
                            }
                          r_index = h->indx;
                                return FALSE;
                            }
                          r_index = h->indx;
@@ -5468,7 +5469,7 @@ NAME (aout, final_link) (bfd *abfd,
     h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
                               FALSE, FALSE, FALSE);
     if (h != NULL)
     h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
                               FALSE, FALSE, FALSE);
     if (h != NULL)
-      aout_link_write_other_symbol (h, &aout_info);
+      aout_link_write_other_symbol (&h->root.root, &aout_info);
   }
 
   /* The most time efficient way to do the link would be to read all
   }
 
   /* The most time efficient way to do the link would be to read all
@@ -5542,9 +5543,9 @@ NAME (aout, final_link) (bfd *abfd,
     }
 
   /* Write out any symbols that we have not already written out.  */
     }
 
   /* Write out any symbols that we have not already written out.  */
-  aout_link_hash_traverse (aout_hash_table (info),
-                          aout_link_write_other_symbol,
-                          (void *) &aout_info);
+  bfd_hash_traverse (&info->hash->table,
+                    aout_link_write_other_symbol,
+                    &aout_info);
 
   /* Now handle any relocs we were asked to create by the linker.
      These did not come from any input file.  We must do these after
 
   /* Now handle any relocs we were asked to create by the linker.
      These did not come from any input file.  We must do these after
index b866d482f7ba017e27887968e5051522148012ec..b37a2247bc86d6d5ace69dff5bcfb12feadf751f 100644 (file)
@@ -2401,8 +2401,7 @@ ppc_bfd_coff_final_link (abfd, info)
 
   /* Write out the global symbols.  */
   finfo.failed = FALSE;
 
   /* Write out the global symbols.  */
   finfo.failed = FALSE;
-  coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
-                          (PTR) &finfo);
+  bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &finfo);
   if (finfo.failed)
     goto error_return;
 
   if (finfo.failed)
     goto error_return;
 
index fdfab1de48f74109e875ae2aae39dc54aa9a184f..bca136445de141eef3bb77cac9b734139810dad7 100644 (file)
@@ -1,6 +1,6 @@
 /* COFF specific linker code.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 /* COFF specific linker code.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1019,8 +1019,7 @@ _bfd_coff_final_link (bfd *abfd,
 
   /* Write out the global symbols.  */
   finfo.failed = FALSE;
 
   /* Write out the global symbols.  */
   finfo.failed = FALSE;
-  coff_link_hash_traverse (coff_hash_table (info),
-                          _bfd_coff_write_global_sym, &finfo);
+  bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &finfo);
   if (finfo.failed)
     goto error_return;
 
   if (finfo.failed)
     goto error_return;
 
@@ -2516,11 +2515,12 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
   return TRUE;
 }
 
   return TRUE;
 }
 
-/* Write out a global symbol.  Called via coff_link_hash_traverse.  */
+/* Write out a global symbol.  Called via bfd_hash_traverse.  */
 
 bfd_boolean
 
 bfd_boolean
-_bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data)
+_bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
 {
 {
+  struct coff_link_hash_entry *h = (struct coff_link_hash_entry *) bh;
   struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
   bfd *output_bfd;
   struct internal_syment isym;
   struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
   bfd *output_bfd;
   struct internal_syment isym;
@@ -2745,7 +2745,7 @@ _bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data)
        case bfd_link_hash_defweak:
          save_global_to_static = finfo->global_to_static;
          finfo->global_to_static = TRUE;
        case bfd_link_hash_defweak:
          save_global_to_static = finfo->global_to_static;
          finfo->global_to_static = TRUE;
-         rtnval = _bfd_coff_write_global_sym (h, data);
+         rtnval = _bfd_coff_write_global_sym (&h->root.root, data);
          finfo->global_to_static = save_global_to_static;
          break;
        default:
          finfo->global_to_static = save_global_to_static;
          break;
        default:
index f85627d2f521f6f66f5207e3a70ff87b0b694003..efcb9bf75cd3dc081e3a281fbef2e646d497f7fb 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic ECOFF (Extended-COFF) routines.
    Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 /* Generic ECOFF (Extended-COFF) routines.
    Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -3231,14 +3231,6 @@ _bfd_ecoff_bfd_link_hash_table_create (bfd *abfd)
   ((struct ecoff_link_hash_entry *) \
    bfd_link_hash_lookup (&(table)->root, (string), (create), (copy), (follow)))
 
   ((struct ecoff_link_hash_entry *) \
    bfd_link_hash_lookup (&(table)->root, (string), (create), (copy), (follow)))
 
-/* Traverse an ECOFF link hash table.  */
-
-#define ecoff_link_hash_traverse(table, func, info)                    \
-  (bfd_link_hash_traverse                                              \
-   (&(table)->root,                                                    \
-    (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func),   \
-    (info)))
-
 /* Get the ECOFF link hash table from the info structure.  This is
    just a cast.  */
 
 /* Get the ECOFF link hash table from the info structure.  This is
    just a cast.  */
 
@@ -4259,8 +4251,9 @@ ecoff_reloc_link_order (bfd *output_bfd,
    the hash table.  */
 
 static bfd_boolean
    the hash table.  */
 
 static bfd_boolean
-ecoff_link_write_external (struct ecoff_link_hash_entry *h, void * data)
+ecoff_link_write_external (struct bfd_hash_entry *bh, void * data)
 {
 {
+  struct ecoff_link_hash_entry *h = (struct ecoff_link_hash_entry *) bh;
   struct extsym_info *einfo = (struct extsym_info *) data;
   bfd *output_bfd = einfo->abfd;
   bfd_boolean strip;
   struct extsym_info *einfo = (struct extsym_info *) data;
   bfd *output_bfd = einfo->abfd;
   bfd_boolean strip;
@@ -4491,9 +4484,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
   /* Write out the external symbols.  */
   einfo.abfd = abfd;
   einfo.info = info;
   /* Write out the external symbols.  */
   einfo.abfd = abfd;
   einfo.info = info;
-  ecoff_link_hash_traverse (ecoff_hash_table (info),
-                           ecoff_link_write_external,
-                           (void *) &einfo);
+  bfd_hash_traverse (&info->hash->table, ecoff_link_write_external, &einfo);
 
   if (info->relocatable)
     {
 
   if (info->relocatable)
     {
index 30b5e02282e0b82f56302d54bcb14155d178fba9..8276a2fb0bfdff24a07d475fd21d58c9a0655aa9 100644 (file)
@@ -1,6 +1,6 @@
 /* Matsushita 10300 specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 /* Matsushita 10300 specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1602,9 +1602,6 @@ elf32_mn10300_finish_hash_table_entry (struct bfd_hash_entry *gen_entry,
 
   entry = (struct elf32_mn10300_link_hash_entry *) gen_entry;
 
 
   entry = (struct elf32_mn10300_link_hash_entry *) gen_entry;
 
-  if (entry->root.root.type == bfd_link_hash_warning)
-    entry = (struct elf32_mn10300_link_hash_entry *) entry->root.root.u.i.link;
-
   /* If we already know we want to convert "call" to "calls" for calls
      to this symbol, then return now.  */
   if (entry->flags == MN10300_CONVERT_CALL_TO_CALLS)
   /* If we already know we want to convert "call" to "calls" for calls
      to this symbol, then return now.  */
   if (entry->flags == MN10300_CONVERT_CALL_TO_CALLS)
index 8ace48a801bc5c90156bbf00a2684c145015a43d..f5b31c6cc692ebfaf6f85d17175535180e21adb2 100644 (file)
@@ -12787,12 +12787,6 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf32_arm_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
   eh = (struct elf32_arm_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
@@ -13156,9 +13150,6 @@ elf32_arm_readonly_dynrelocs (struct elf_link_hash_entry * h, void * inf)
   struct elf32_arm_link_hash_entry * eh;
   struct elf_dyn_relocs * p;
 
   struct elf32_arm_link_hash_entry * eh;
   struct elf_dyn_relocs * p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf32_arm_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf32_arm_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index 40c2c0446b06e40612e0f1a99e2e5710c67b4e9d..b112dfc267f5fad95d85f98d2c6821c77524f73c 100644 (file)
@@ -5451,9 +5451,6 @@ bfin_discard_copies (struct elf_link_hash_entry *h, PTR inf)
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
   struct bfin_pcrel_relocs_copied *s;
 
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
   struct bfin_pcrel_relocs_copied *s;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (!h->def_regular || (!info->symbolic && !h->forced_local))
     {
       if ((info->flags & DF_TEXTREL) == 0)
   if (!h->def_regular || (!info->symbolic && !h->forced_local))
     {
       if ((info->flags & DF_TEXTREL) == 0)
index 9644e9b902d38bd83d6faf7467ad18a8374d34b2..ea5043ac0f644da49003e254bb4490fe55ba8fde 100644 (file)
@@ -1,6 +1,6 @@
 /* CRIS-specific support for 32-bit ELF.
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 /* CRIS-specific support for 32-bit ELF.
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
    Contributed by Axis Communications AB.
    Written by Hans-Peter Nilsson, based on elf32-fr30.c
    PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
    Contributed by Axis Communications AB.
    Written by Hans-Peter Nilsson, based on elf32-fr30.c
    PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
@@ -2733,9 +2733,6 @@ elf_cris_adjust_gotplt_to_got (h, p)
 {
   struct bfd_link_info *info = (struct bfd_link_info *) p;
 
 {
   struct bfd_link_info *info = (struct bfd_link_info *) p;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
-
   /* If nobody wanted a GOTPLT with this symbol, we're done.  */
   if (h->gotplt_refcount <= 0)
     return TRUE;
   /* If nobody wanted a GOTPLT with this symbol, we're done.  */
   if (h->gotplt_refcount <= 0)
     return TRUE;
@@ -3956,9 +3953,6 @@ elf_cris_discard_excess_dso_dynamics (h, inf)
   struct elf_cris_pcrel_relocs_copied *s;
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
   struct elf_cris_pcrel_relocs_copied *s;
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
-
   /* If a symbol has been forced local or we have found a regular
      definition for the symbolic link case, then we won't be needing
      any relocs.  */
   /* If a symbol has been forced local or we have found a regular
      definition for the symbolic link case, then we won't be needing
      any relocs.  */
@@ -4014,9 +4008,6 @@ elf_cris_discard_excess_program_dynamics (h, inf)
 {
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
 {
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
-
   /* If we're not creating a shared library and have a symbol which is
      referred to by .got references, but the symbol is defined locally,
      (or rather, not defined by a DSO) then lose the reloc for the .got
   /* If we're not creating a shared library and have a symbol which is
      referred to by .got references, but the symbol is defined locally,
      (or rather, not defined by a DSO) then lose the reloc for the .got
index e70d7e52f340361e7adcb64493831b1497927cce..0e33f47a6a409bfced8a2730fc3351c947077b6e 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for HP PA-RISC ELF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
 /* BFD back-end for HP PA-RISC ELF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    Original code by
    Free Software Foundation, Inc.
 
    Original code by
@@ -1938,9 +1938,6 @@ allocate_plt_static (struct elf_link_hash_entry *eh, void *inf)
   if (eh->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (eh->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   hh = hppa_elf_hash_entry (eh);
   htab = hppa_link_hash_table (info);
   info = (struct bfd_link_info *) inf;
   hh = hppa_elf_hash_entry (eh);
   htab = hppa_link_hash_table (info);
@@ -2008,9 +2005,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
   if (eh->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (eh->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   info = inf;
   htab = hppa_link_hash_table (info);
   if (htab == NULL)
   info = inf;
   htab = hppa_link_hash_table (info);
   if (htab == NULL)
@@ -2170,9 +2164,6 @@ static bfd_boolean
 clobber_millicode_symbols (struct elf_link_hash_entry *eh,
                           struct bfd_link_info *info)
 {
 clobber_millicode_symbols (struct elf_link_hash_entry *eh,
                           struct bfd_link_info *info)
 {
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   if (eh->type == STT_PARISC_MILLI
       && !eh->forced_local)
     {
   if (eh->type == STT_PARISC_MILLI
       && !eh->forced_local)
     {
@@ -2189,9 +2180,6 @@ readonly_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
   struct elf32_hppa_link_hash_entry *hh;
   struct elf32_hppa_dyn_reloc_entry *hdh_p;
 
   struct elf32_hppa_link_hash_entry *hh;
   struct elf32_hppa_dyn_reloc_entry *hdh_p;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   hh = hppa_elf_hash_entry (eh);
   for (hdh_p = hh->dyn_relocs; hdh_p != NULL; hdh_p = hdh_p->hdh_next)
     {
   hh = hppa_elf_hash_entry (eh);
   for (hdh_p = hh->dyn_relocs; hdh_p != NULL; hdh_p = hdh_p->hdh_next)
     {
index a6174c2ea20ac327c37bed2b9f787f65dfa530d8..c9f4333bba41fb0256b36cc7ea9e56606139079b 100644 (file)
@@ -1,6 +1,6 @@
 /* i370-specific support for 32-bit ELF
    Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
 /* i370-specific support for 32-bit ELF
    Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2010  Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Hacked by Linas Vepstas for i370 linas@linas.org
 
    Written by Ian Lance Taylor, Cygnus Support.
    Hacked by Linas Vepstas for i370 linas@linas.org
 
@@ -562,9 +562,6 @@ i370_elf_adjust_dynindx (struct elf_link_hash_entry *h, void * cparg)
           h->dynindx, *cp);
 #endif
 
           h->dynindx, *cp);
 #endif
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->dynindx != -1)
     h->dynindx += *cp;
 
   if (h->dynindx != -1)
     h->dynindx += *cp;
 
index eea22633a5ead970d96097333b06c87f26008279..05962a07f7fee586ffb2a86e18e34105ae2c676d 100644 (file)
@@ -2083,11 +2083,6 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
   eh = (struct elf_i386_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
   eh = (struct elf_i386_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
@@ -2383,9 +2378,6 @@ elf_i386_readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   struct elf_i386_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
   struct elf_i386_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Skip local IFUNC symbols. */
   if (h->forced_local && h->type == STT_GNU_IFUNC)
     return TRUE;
   /* Skip local IFUNC symbols. */
   if (h->forced_local && h->type == STT_GNU_IFUNC)
     return TRUE;
index b6e8ba0f3995a8b129d6674598ca085eadf7a50d..07add20c478aa22b52983acbceada4b176e660a0 100644 (file)
@@ -1,5 +1,5 @@
 /* Lattice Mico32-specific support for 32-bit ELF
 /* Lattice Mico32-specific support for 32-bit ELF
-   Copyright 2008, 2009, 2010  Free Software Foundation, Inc.
+   Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Jon Beniston <jon@beniston.com>
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Jon Beniston <jon@beniston.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1918,12 +1918,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = lm32_elf_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) inf;
   htab = lm32_elf_hash_table (info);
   if (htab == NULL)
@@ -2110,9 +2104,6 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf)
   struct elf_lm32_link_hash_entry *eh;
   struct elf_lm32_dyn_relocs *p;
 
   struct elf_lm32_link_hash_entry *eh;
   struct elf_lm32_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_lm32_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf_lm32_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index e9cabaa963adaa8c540cde0f613f892084be1603..cf7ad99ccffe2b828f8f1b5aca817542f54380b7 100644 (file)
@@ -1,5 +1,5 @@
 /* M16C/M32C specific support for 32-bit ELF.
 /* M16C/M32C specific support for 32-bit ELF.
-   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -989,9 +989,6 @@ m32c_relax_plt_check (struct elf_link_hash_entry *h,
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
@@ -1024,9 +1021,6 @@ m32c_relax_plt_realloc (struct elf_link_hash_entry *h,
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
index 0b114bd99689bdb3058bd7e59042137ac45a57e4..51ef61e6b4980b1165628a3e747ada923a2692c2 100644 (file)
@@ -1,6 +1,6 @@
 /* M32R-specific support for 32-bit ELF.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 /* M32R-specific support for 32-bit ELF.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1977,12 +1977,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = m32r_elf_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) inf;
   htab = m32r_elf_hash_table (info);
   if (htab == NULL)
@@ -2169,9 +2163,6 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf)
   struct elf_m32r_link_hash_entry *eh;
   struct elf_m32r_dyn_relocs *p;
 
   struct elf_m32r_link_hash_entry *eh;
   struct elf_m32r_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_m32r_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf_m32r_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index b4f7bc2c94c9346a2b7a3e4fd522fe1e4c41bccf..612525c2ad6ce11ebe022fcdd8096134abd46f96 100644 (file)
@@ -1,6 +1,7 @@
 /* Motorola 68k series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 /* Motorola 68k series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -3466,9 +3467,6 @@ elf_m68k_discard_copies (h, inf)
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
   struct elf_m68k_pcrel_relocs_copied *s;
 
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
   struct elf_m68k_pcrel_relocs_copied *s;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (!SYMBOL_CALLS_LOCAL (info, h))
     {
       if ((info->flags & DF_TEXTREL) == 0)
   if (!SYMBOL_CALLS_LOCAL (info, h))
     {
       if ((info->flags & DF_TEXTREL) == 0)
index 2d460ab9a7a07d556d5fa80cae4c62fb24ce0bd8..b180dc4308cd9b312ae04a9f65f72504576979f4 100644 (file)
@@ -2382,12 +2382,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) dat;
   htab = elf32_mb_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) dat;
   htab = elf32_mb_hash_table (info);
   if (htab == NULL)
index d8be8c65260c2fb7f349a53a9a5038e3cafcd00b..f05ddb26674fa6ed53b5575f03f32e602aa6f585 100644 (file)
@@ -5149,12 +5149,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   htab = ppc_elf_hash_table (info);
   if (htab->elf.dynamic_sections_created
       || h->type == STT_GNU_IFUNC)
   htab = ppc_elf_hash_table (info);
   if (htab->elf.dynamic_sections_created
       || h->type == STT_GNU_IFUNC)
@@ -5504,9 +5498,6 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (readonly_dynrelocs (h))
     {
       ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
   if (readonly_dynrelocs (h))
     {
       ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
index 46e9541f07ff0101ed0174c80dfd2d1c3adcb541..98437d0df903af2b533930ec91acb398b7c54aad 100644 (file)
@@ -1,6 +1,6 @@
 /* IBM S/390-specific support for 32-bit ELF
 /* IBM S/390-specific support for 32-bit ELF
-   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+   2011 Free Software Foundation, Inc.
    Contributed by Carl B. Pedersen and Martin Schwidefsky.
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Carl B. Pedersen and Martin Schwidefsky.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1696,12 +1696,6 @@ allocate_dynrelocs (h, inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = elf_s390_hash_table (info);
 
   info = (struct bfd_link_info *) inf;
   htab = elf_s390_hash_table (info);
 
@@ -1922,9 +1916,6 @@ readonly_dynrelocs (h, inf)
   struct elf_s390_link_hash_entry *eh;
   struct elf_s390_dyn_relocs *p;
 
   struct elf_s390_link_hash_entry *eh;
   struct elf_s390_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_s390_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf_s390_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index 1c08c8ac32b061d5d67a1896afd0e8e33a877f25..b4376242c94e648ef9f9ed26e5adfe6822bfe067 100644 (file)
@@ -1,5 +1,6 @@
 /* 32-bit ELF support for S+core.
 /* 32-bit ELF support for S+core.
-   Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
@@ -1037,9 +1038,6 @@ score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data)
 {
   struct score_elf_hash_sort_data *hsd = data;
 
 {
   struct score_elf_hash_sort_data *hsd = data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
index 9ce3bf1dea059a0f75f088c5e2fb20a44b23de89..3e98bfc45ac2fc8038b5cbe7589c04f5b96a56c4 100644 (file)
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for S+core.
 /* 32-bit ELF support for S+core.
-   Copyright 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
@@ -920,9 +920,6 @@ score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data)
 {
   struct score_elf_hash_sort_data *hsd = data;
 
 {
   struct score_elf_hash_sort_data *hsd = data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
index e15f51c20f4dc72e2b37f99317ef9543df2eab2c..b85b7c2111b9e5c196ce5790b341b9335dbfacda 100644 (file)
@@ -1,6 +1,6 @@
 /* Renesas / SuperH SH specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 /* Renesas / SuperH SH specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -2977,12 +2977,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = sh_elf_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) inf;
   htab = sh_elf_hash_table (info);
   if (htab == NULL)
@@ -3321,9 +3315,6 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   struct elf_sh_link_hash_entry *eh;
   struct elf_sh_dyn_relocs *p;
 
   struct elf_sh_link_hash_entry *eh;
   struct elf_sh_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_sh_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf_sh_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index 9b2b0f03c9bf0d29c9664315f4bd053703631503..b31e640939486a6a8344010d45da6a27620e911b 100644 (file)
@@ -3127,13 +3127,7 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
   eh = (struct elf32_tic6x_link_hash_entry *) h;
   eh = (struct elf32_tic6x_link_hash_entry *) h;
-
   info = (struct bfd_link_info *) inf;
   htab = elf32_tic6x_hash_table (info);
 
   info = (struct bfd_link_info *) inf;
   htab = elf32_tic6x_hash_table (info);
 
@@ -3277,9 +3271,6 @@ elf32_tic6x_readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   struct elf32_tic6x_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
   struct elf32_tic6x_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf32_tic6x_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf32_tic6x_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index 78f14ecead2c145fb6cbe540f836e6fa2c083442..643381c5c43b8311f232c272df395e8610c727a1 100644 (file)
@@ -1,6 +1,7 @@
 /* VAX series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 /* VAX series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    Contributed by Matt Thomas <matt@3am-software.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Matt Thomas <matt@3am-software.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1272,9 +1273,6 @@ elf_vax_discard_copies (struct elf_vax_link_hash_entry *h,
 {
   struct elf_vax_pcrel_relocs_copied *s;
 
 {
   struct elf_vax_pcrel_relocs_copied *s;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_vax_link_hash_entry *) h->root.root.u.i.link;
-
   /* We only discard relocs for symbols defined in a regular object.  */
   if (!h->root.def_regular)
     return TRUE;
   /* We only discard relocs for symbols defined in a regular object.  */
   if (!h->root.def_regular)
     return TRUE;
index 09c894e95b12f1523386020efd4f9de777489b77..614178337e9a86c82d4808aa2133bf136c9354c8 100644 (file)
@@ -1,5 +1,5 @@
 /* Xstormy16-specific support for 32-bit ELF.
 /* Xstormy16-specific support for 32-bit ELF.
-   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -537,9 +537,6 @@ xstormy16_relax_plt_check (struct elf_link_hash_entry *h, void * xdata)
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
@@ -571,9 +568,6 @@ xstormy16_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata)
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
index 3be01613180212b4243be8ee3400f7c0fce6d140..c6e4fb43a01cd26fbc4ceafce5e10f219a21cdff 100644 (file)
@@ -1531,9 +1531,6 @@ elf_xtensa_allocate_dynrelocs (struct elf_link_hash_entry *h, void *arg)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) arg;
   htab = elf_xtensa_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) arg;
   htab = elf_xtensa_hash_table (info);
   if (htab == NULL)
index 33b27ac6d3cbe6fc824e43d62972780895f274c0..4efe02a6ec4d046e2a4021f7a1e376ccedd3c35c 100644 (file)
@@ -1553,9 +1553,6 @@ elf64_alpha_output_extsym (struct alpha_elf_link_hash_entry *h, PTR data)
   bfd_boolean strip;
   asection *sec, *output_section;
 
   bfd_boolean strip;
   asection *sec, *output_section;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
   if (h->root.indx == -2)
     strip = FALSE;
   else if ((h->root.def_dynamic
   if (h->root.indx == -2)
     strip = FALSE;
   else if ((h->root.def_dynamic
@@ -2390,9 +2387,6 @@ elf64_alpha_calc_got_offsets_for_symbol (struct alpha_elf_link_hash_entry *h,
 {
   struct alpha_elf_got_entry *gotent;
 
 {
   struct alpha_elf_got_entry *gotent;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
   for (gotent = h->got_entries; gotent; gotent = gotent->next)
     if (gotent->use_count > 0)
       {
   for (gotent = h->got_entries; gotent; gotent = gotent->next)
     if (gotent->use_count > 0)
       {
@@ -2695,9 +2689,6 @@ elf64_alpha_calc_dynrel_sizes (struct alpha_elf_link_hash_entry *h,
   struct alpha_elf_reloc_entry *relent;
   unsigned long entries;
 
   struct alpha_elf_reloc_entry *relent;
   unsigned long entries;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* If the symbol was defined as a common symbol in a regular object
      file, and there was no definition in any dynamic object, then the
      linker will have allocated space for the symbol in a common
   /* If the symbol was defined as a common symbol in a regular object
      file, and there was no definition in any dynamic object, then the
      linker will have allocated space for the symbol in a common
@@ -2751,9 +2742,6 @@ elf64_alpha_size_rela_got_1 (struct alpha_elf_link_hash_entry *h,
   struct alpha_elf_got_entry *gotent;
   unsigned long entries;
 
   struct alpha_elf_got_entry *gotent;
   unsigned long entries;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* If we're using a plt for this symbol, then all of its relocations
      for its got entries go into .rela.plt.  */
   if (h->root.needs_plt)
   /* If we're using a plt for this symbol, then all of its relocations
      for its got entries go into .rela.plt.  */
   if (h->root.needs_plt)
index d8213a01a8ac80a2cc30fa5b7b78ed5f12f1e426..d78225b567dce34dd0d135259e9fc17adbf7530d 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for HPPA 64-bit ELF
    1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 /* Support for HPPA 64-bit ELF
    1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -937,9 +937,6 @@ elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *eh, void *data)
   if (hppa_info == NULL)
     return FALSE;
 
   if (hppa_info == NULL)
     return FALSE;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   if (eh
       && (eh->root.type == bfd_link_hash_defined
          || eh->root.type == bfd_link_hash_defweak)
   if (eh
       && (eh->root.type == bfd_link_hash_defined
          || eh->root.type == bfd_link_hash_defweak)
@@ -1056,10 +1053,6 @@ allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data)
 
   if (hh && hh->want_opd)
     {
 
   if (hh && hh->want_opd)
     {
-      while (hh->eh.root.type == bfd_link_hash_indirect
-            || hh->eh.root.type == bfd_link_hash_warning)
-       hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
-
       /* We never need an opd entry for a symbol which is not
         defined by this output file.  */
       if (hh && (hh->eh.root.type == bfd_link_hash_undefined
       /* We never need an opd entry for a symbol which is not
         defined by this output file.  */
       if (hh && (hh->eh.root.type == bfd_link_hash_undefined
@@ -1512,19 +1505,15 @@ static bfd_boolean
 elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh,
                                              void *data)
 {
 elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh,
                                              void *data)
 {
-  struct elf_link_hash_entry *elf = eh;
-  struct bfd_link_info *info = (struct bfd_link_info *)data;
-
-  if (elf->root.type == bfd_link_hash_warning)
-    elf = (struct elf_link_hash_entry *) elf->root.u.i.link;
+  struct bfd_link_info *info = (struct bfd_link_info *) data;
 
 
-  if (elf->type == STT_PARISC_MILLI)
+  if (eh->type == STT_PARISC_MILLI)
     {
     {
-      if (elf->dynindx != -1)
+      if (eh->dynindx != -1)
        {
        {
-         elf->dynindx = -1;
+         eh->dynindx = -1;
          _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
          _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
-                                 elf->dynstr_index);
+                                 eh->dynstr_index);
        }
       return TRUE;
     }
        }
       return TRUE;
     }
@@ -2839,9 +2828,6 @@ elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
 {
   struct bfd_link_info *info = data;
 
 {
   struct bfd_link_info *info = data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* If we are not creating a shared library, and this symbol is
      referenced by a shared library but is not defined anywhere, then
      the generic code will warn that it is undefined.
   /* If we are not creating a shared library, and this symbol is
      referenced by a shared library but is not defined anywhere, then
      the generic code will warn that it is undefined.
@@ -2873,9 +2859,6 @@ elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
 {
   struct bfd_link_info *info = data;
 
 {
   struct bfd_link_info *info = data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* If we are not creating a shared library, and this symbol is
      referenced by a shared library but is not defined anywhere, then
      the generic code will warn that it is undefined.
   /* If we are not creating a shared library, and this symbol is
      referenced by a shared library but is not defined anywhere, then
      the generic code will warn that it is undefined.
index 70e2a8a5dcee3796f2c04b7476aef6b43be21ba2..14fa20b2ac5477e9b126eef8313e87f1e4faf549 100644 (file)
@@ -5669,9 +5669,6 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf)
   struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h;
   struct ppc_link_hash_entry *fdh;
 
   struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h;
   struct ppc_link_hash_entry *fdh;
 
-  if (eh->elf.root.type == bfd_link_hash_warning)
-    eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
-
   /* Dynamic linking info is on the func descriptor sym.  */
   fdh = defined_func_desc (eh);
   if (fdh != NULL)
   /* Dynamic linking info is on the func descriptor sym.  */
   fdh = defined_func_desc (eh);
   if (fdh != NULL)
@@ -6214,9 +6211,6 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
   if (fh->elf.root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (fh->elf.root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (fh->elf.root.type == bfd_link_hash_warning)
-    fh = (struct ppc_link_hash_entry *) fh->elf.root.u.i.link;
-
   info = inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
   info = inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
@@ -6742,9 +6736,6 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->root.type != bfd_link_hash_defined
       && h->root.type != bfd_link_hash_defweak)
     return TRUE;
   if (h->root.type != bfd_link_hash_defined
       && h->root.type != bfd_link_hash_defweak)
     return TRUE;
@@ -7905,9 +7896,6 @@ adjust_toc_syms (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->root.type != bfd_link_hash_defined
       && h->root.type != bfd_link_hash_defweak)
     return TRUE;
   if (h->root.type != bfd_link_hash_defined
       && h->root.type != bfd_link_hash_defweak)
     return TRUE;
@@ -8603,9 +8591,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
@@ -8846,9 +8831,6 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   struct ppc_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
   struct ppc_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct ppc_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct ppc_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
@@ -10217,9 +10199,6 @@ merge_global_got (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   merge_got_entries (&h->got.glist);
 
   return TRUE;
   merge_got_entries (&h->got.glist);
 
   return TRUE;
@@ -10236,9 +10215,6 @@ reallocate_got (struct elf_link_hash_entry *h, void *inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   for (gent = h->got.glist; gent != NULL; gent = gent->next)
     if (!gent->is_indirect)
       allocate_got (h, (struct bfd_link_info *) inf, gent);
   for (gent = h->got.glist; gent != NULL; gent = gent->next)
     if (!gent->is_indirect)
       allocate_got (h, (struct bfd_link_info *) inf, gent);
@@ -11493,9 +11469,6 @@ undo_symbol_twiddle (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct ppc_link_hash_entry *) h;
   if (eh->elf.root.type != bfd_link_hash_undefweak || !eh->was_undefined)
     return TRUE;
   eh = (struct ppc_link_hash_entry *) h;
   if (eh->elf.root.type != bfd_link_hash_undefweak || !eh->was_undefined)
     return TRUE;
index 671cb93a4a5aeaf1e1eb500ba4d8463e798e0e4a..9884da03b61482c907c93756193f375dfbfa613b 100644 (file)
@@ -1,6 +1,6 @@
 /* IBM S/390-specific support for 64-bit ELF
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 /* IBM S/390-specific support for 64-bit ELF
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
    Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1680,12 +1680,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h,
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = elf_s390_hash_table (info);
   if (htab == NULL)
   info = (struct bfd_link_info *) inf;
   htab = elf_s390_hash_table (info);
   if (htab == NULL)
@@ -1907,9 +1901,6 @@ readonly_dynrelocs (h, inf)
   struct elf_s390_link_hash_entry *eh;
   struct elf_s390_dyn_relocs *p;
 
   struct elf_s390_link_hash_entry *eh;
   struct elf_s390_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_s390_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct elf_s390_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index 969230464129c86113b80210140a30d799e90465..bbef2a216cf86bbc111584d14259d8e4bd0e8d25 100644 (file)
@@ -1,6 +1,6 @@
 /* SuperH SH64-specific support for 64-bit ELF
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 /* SuperH SH64-specific support for 64-bit ELF
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -3422,9 +3422,6 @@ sh64_elf64_discard_copies (struct elf_sh64_link_hash_entry *h,
 {
   struct elf_sh64_pcrel_relocs_copied *s;
 
 {
   struct elf_sh64_pcrel_relocs_copied *s;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_sh64_link_hash_entry *) h->root.root.u.i.link;
-
   /* We only discard relocs for symbols defined in a regular object.  */
   if (!h->root.def_regular)
     return TRUE;
   /* We only discard relocs for symbols defined in a regular object.  */
   if (!h->root.def_regular)
     return TRUE;
index 72a7cc1dc088ad3520ee17e9e487f43c24182d69..8ebd56ed685eebb8ab9e8bfae9d67b392535155a 100644 (file)
@@ -2039,8 +2039,6 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
   eh = (struct elf_x86_64_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
   eh = (struct elf_x86_64_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
@@ -2305,9 +2303,6 @@ elf_x86_64_readonly_dynrelocs (struct elf_link_hash_entry *h,
   struct elf_x86_64_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
   struct elf_x86_64_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Skip local IFUNC symbols. */
   if (h->forced_local && h->type == STT_GNU_IFUNC)
     return TRUE;
   /* Skip local IFUNC symbols. */
   if (h->forced_local && h->type == STT_GNU_IFUNC)
     return TRUE;
index ef7a524809e0a6defbefb26dd1fe821e37360cce..9d2d68a3397766d08ccdb23c655bd89e9a59bf1e 100644 (file)
@@ -722,9 +722,6 @@ elf_link_renumber_hash_table_dynsyms (struct elf_link_hash_entry *h,
 {
   size_t *count = (size_t *) data;
 
 {
   size_t *count = (size_t *) data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->forced_local)
     return TRUE;
 
   if (h->forced_local)
     return TRUE;
 
@@ -744,9 +741,6 @@ elf_link_renumber_local_hash_table_dynsyms (struct elf_link_hash_entry *h,
 {
   size_t *count = (size_t *) data;
 
 {
   size_t *count = (size_t *) data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (!h->forced_local)
     return TRUE;
 
   if (!h->forced_local)
     return TRUE;
 
@@ -1812,16 +1806,13 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data)
 {
   struct elf_info_failed *eif = (struct elf_info_failed *) data;
 
 {
   struct elf_info_failed *eif = (struct elf_info_failed *) data;
 
-  /* Ignore this if we won't export it.  */
-  if (!eif->info->export_dynamic && !h->dynamic)
-    return TRUE;
-
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+  /* Ignore this if we won't export it.  */
+  if (!eif->info->export_dynamic && !h->dynamic)
+    return TRUE;
 
   if (h->dynindx == -1
       && (h->def_regular
 
   if (h->dynindx == -1
       && (h->def_regular
@@ -1858,9 +1849,6 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h,
   Elf_Internal_Vernaux *a;
   bfd_size_type amt;
 
   Elf_Internal_Vernaux *a;
   bfd_size_type amt;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* We only care about symbols defined in shared objects with version
      information.  */
   if (!h->def_dynamic
   /* We only care about symbols defined in shared objects with version
      information.  */
   if (!h->def_dynamic
@@ -1946,9 +1934,6 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
   sinfo = (struct elf_info_failed *) data;
   info = sinfo->info;
 
   sinfo = (struct elf_info_failed *) data;
   info = sinfo->info;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Fix the symbol flags.  */
   eif.failed = FALSE;
   eif.info = info;
   /* Fix the symbol flags.  */
   eif.failed = FALSE;
   eif.info = info;
@@ -2564,17 +2549,6 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
   if (! is_elf_hash_table (eif->info->hash))
     return FALSE;
 
   if (! is_elf_hash_table (eif->info->hash))
     return FALSE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    {
-      h->got = elf_hash_table (eif->info)->init_got_offset;
-      h->plt = elf_hash_table (eif->info)->init_plt_offset;
-
-      /* When warning symbols are created, they **replace** the "real"
-        entry in the hash table, thus we never get to see the real
-        symbol in a hash traversal.  So look at it now.  */
-      h = (struct elf_link_hash_entry *) h->root.u.i.link;
-    }
-
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
@@ -2730,9 +2704,6 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data)
 {
   asection *sec;
 
 {
   asection *sec;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && ((sec = h->root.u.def.section)->flags & SEC_MERGE)
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && ((sec = h->root.u.def.section)->flags & SEC_MERGE)
@@ -3180,9 +3151,6 @@ elf_adjust_dynstr_offsets (struct elf_link_hash_entry *h, void *data)
 {
   struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data;
 
 {
   struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->dynindx != -1)
     h->dynstr_index = _bfd_elf_strtab_offset (dynstr, h->dynstr_index);
   return TRUE;
   if (h->dynindx != -1)
     h->dynstr_index = _bfd_elf_strtab_offset (dynstr, h->dynstr_index);
   return TRUE;
@@ -5175,9 +5143,6 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data)
   unsigned long ha;
   char *alc = NULL;
 
   unsigned long ha;
   char *alc = NULL;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->dynindx == -1)
     return TRUE;
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->dynindx == -1)
     return TRUE;
@@ -5246,9 +5211,6 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data)
   unsigned long ha;
   char *alc = NULL;
 
   unsigned long ha;
   char *alc = NULL;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->dynindx == -1)
     return TRUE;
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->dynindx == -1)
     return TRUE;
@@ -5299,9 +5261,6 @@ elf_renumber_gnu_hash_syms (struct elf_link_hash_entry *h, void *data)
   unsigned long int bucket;
   unsigned long int val;
 
   unsigned long int bucket;
   unsigned long int val;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Ignore indirect symbols.  */
   if (h->dynindx == -1)
     return TRUE;
   /* Ignore indirect symbols.  */
   if (h->dynindx == -1)
     return TRUE;
@@ -8605,8 +8564,9 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info,
    global symbols.  */
 
 static bfd_boolean
    global symbols.  */
 
 static bfd_boolean
-elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
+elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
 {
 {
+  struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) bh;
   struct elf_outext_info *eoinfo = (struct elf_outext_info *) data;
   struct elf_final_link_info *finfo = eoinfo->finfo;
   bfd_boolean strip;
   struct elf_outext_info *eoinfo = (struct elf_outext_info *) data;
   struct elf_final_link_info *finfo = eoinfo->finfo;
   bfd_boolean strip;
@@ -10822,8 +10782,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
   eoinfo.failed = FALSE;
   eoinfo.finfo = &finfo;
   eoinfo.localsyms = TRUE;
   eoinfo.failed = FALSE;
   eoinfo.finfo = &finfo;
   eoinfo.localsyms = TRUE;
-  elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym,
-                         &eoinfo);
+  bfd_hash_traverse (&info->hash->table, elf_link_output_extsym, &eoinfo);
   if (eoinfo.failed)
     return FALSE;
 
   if (eoinfo.failed)
     return FALSE;
 
@@ -10932,8 +10891,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
   eoinfo.failed = FALSE;
   eoinfo.localsyms = FALSE;
   eoinfo.finfo = &finfo;
   eoinfo.failed = FALSE;
   eoinfo.localsyms = FALSE;
   eoinfo.finfo = &finfo;
-  elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym,
-                         &eoinfo);
+  bfd_hash_traverse (&info->hash->table, elf_link_output_extsym, &eoinfo);
   if (eoinfo.failed)
     return FALSE;
 
   if (eoinfo.failed)
     return FALSE;
 
@@ -11687,9 +11645,6 @@ struct elf_gc_sweep_symbol_info
 static bfd_boolean
 elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
 {
 static bfd_boolean
 elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
 {
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && !h->root.u.def.section->gc_mark
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && !h->root.u.def.section->gc_mark
@@ -11801,9 +11756,6 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
 static bfd_boolean
 elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
 {
 static bfd_boolean
 elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
 {
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Those that are not vtables.  */
   if (h->vtable == NULL || h->vtable->parent == NULL)
     return TRUE;
   /* Those that are not vtables.  */
   if (h->vtable == NULL || h->vtable->parent == NULL)
     return TRUE;
@@ -11865,9 +11817,6 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
   const struct elf_backend_data *bed;
   unsigned int log_file_align;
 
   const struct elf_backend_data *bed;
   unsigned int log_file_align;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* Take care of both those symbols that do not describe vtables as
      well as those that are not loaded.  */
   if (h->vtable == NULL || h->vtable->parent == NULL)
   /* Take care of both those symbols that do not describe vtables as
      well as those that are not loaded.  */
   if (h->vtable == NULL || h->vtable->parent == NULL)
@@ -11915,9 +11864,6 @@ bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf)
 {
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
 {
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && (h->ref_dynamic
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && (h->ref_dynamic
@@ -12190,9 +12136,6 @@ elf_gc_allocate_got_offsets (struct elf_link_hash_entry *h, void *arg)
   bfd *obfd = gofarg->info->output_bfd;
   const struct elf_backend_data *bed = get_elf_backend_data (obfd);
 
   bfd *obfd = gofarg->info->output_bfd;
   const struct elf_backend_data *bed = get_elf_backend_data (obfd);
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->got.refcount > 0)
     {
       h->got.offset = gofarg->gotoff;
   if (h->got.refcount > 0)
     {
       h->got.offset = gofarg->gotoff;
index 9f846809b0eae7d6aff2326d3a7403ff01def400..bc31fca790362f6763573e03b85648410f4a1dc6 100644 (file)
@@ -1421,9 +1421,6 @@ elfNN_ia64_global_dyn_info_free (void **xentry,
   struct elfNN_ia64_link_hash_entry *entry
     = (struct elfNN_ia64_link_hash_entry *) xentry;
 
   struct elfNN_ia64_link_hash_entry *entry
     = (struct elfNN_ia64_link_hash_entry *) xentry;
 
-  if (entry->root.root.type == bfd_link_hash_warning)
-    entry = (struct elfNN_ia64_link_hash_entry *) entry->root.root.u.i.link;
-
   if (entry->info)
     {
       free (entry->info);
   if (entry->info)
     {
       free (entry->info);
@@ -1496,9 +1493,6 @@ elfNN_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry,
   struct elfNN_ia64_dyn_sym_info *dyn_i;
   unsigned int count;
 
   struct elfNN_ia64_dyn_sym_info *dyn_i;
   unsigned int count;
 
-  if (entry->root.root.type == bfd_link_hash_warning)
-    entry = (struct elfNN_ia64_link_hash_entry *) entry->root.root.u.i.link;
-
   for (count = entry->count, dyn_i = entry->info;
        count != 0;
        count--, dyn_i++)
   for (count = entry->count, dyn_i = entry->info;
        count != 0;
        count--, dyn_i++)
index d5f677fad5fb0edee592bf986a8fdc8b84eaf020..2ce56789c0bdbe7073364ed4a507bdc12ee53953 100644 (file)
@@ -1719,9 +1719,6 @@ mips_elf_check_symbols (struct mips_elf_link_hash_entry *h, void *data)
   struct mips_htab_traverse_info *hti;
 
   hti = (struct mips_htab_traverse_info *) data;
   struct mips_htab_traverse_info *hti;
 
   hti = (struct mips_htab_traverse_info *) data;
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
-
   if (!hti->info->relocatable)
     mips_elf_check_mips16_stubs (hti->info, h);
 
   if (!hti->info->relocatable)
     mips_elf_check_mips16_stubs (hti->info, h);
 
@@ -2409,9 +2406,6 @@ mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data)
   bfd_boolean strip;
   asection *sec, *output_section;
 
   bfd_boolean strip;
   asection *sec, *output_section;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
-
   if (h->root.indx == -2)
     strip = FALSE;
   else if ((h->root.def_dynamic
   if (h->root.indx == -2)
     strip = FALSE;
   else if ((h->root.def_dynamic
@@ -3437,9 +3431,6 @@ mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data)
 {
   struct mips_elf_hash_sort_data *hsd = data;
 
 {
   struct mips_elf_hash_sort_data *hsd = data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* Symbols without dynamic symbol table entries aren't interesting
      at all.  */
   if (h->root.dynindx == -1)
   /* Symbols without dynamic symbol table entries aren't interesting
      at all.  */
   if (h->root.dynindx == -1)
@@ -8147,10 +8138,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   if (htab->is_vxworks && !info->shared)
     return TRUE;
 
   if (htab->is_vxworks && !info->shared)
     return TRUE;
 
-  /* Ignore indirect and warning symbols.  All relocations against
-     such symbols will be redirected to the target symbol.  */
-  if (h->root.type == bfd_link_hash_indirect
-      || h->root.type == bfd_link_hash_warning)
+  /* Ignore indirect symbols.  All relocations against such symbols
+     will be redirected to the target symbol.  */
+  if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   /* If this symbol is defined in a dynamic object, or we are creating
     return TRUE;
 
   /* If this symbol is defined in a dynamic object, or we are creating
index f0f79070a368f65c1608ca4a23bdc2ca3e8a74f7..d72dcba0a3eadd649fdcae4b780bf8943facd510 100644 (file)
@@ -1,5 +1,6 @@
 /* SPARC-specific support for ELF
 /* SPARC-specific support for ELF
-   Copyright 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -2145,12 +2146,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = _bfd_sparc_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
   info = (struct bfd_link_info *) inf;
   htab = _bfd_sparc_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -2426,9 +2421,6 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
   struct _bfd_sparc_elf_link_hash_entry *eh;
   struct _bfd_sparc_elf_dyn_relocs *p;
 
   struct _bfd_sparc_elf_link_hash_entry *eh;
   struct _bfd_sparc_elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct _bfd_sparc_elf_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
   eh = (struct _bfd_sparc_elf_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index a5bb77db12d005b9675d6a36be1a96dd90ee2f2a..03a2dbe71b49aebaf65d3f667b88653114eb379e 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for linux flavored i386 a.out binaries.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003,
 /* BFD back-end for linux flavored i386 a.out binaries.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -435,9 +435,6 @@ linux_tally_symbols (h, data)
   struct linux_link_hash_entry *h1, *h2;
   bfd_boolean exists;
 
   struct linux_link_hash_entry *h1, *h2;
   bfd_boolean exists;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
-
   if (h->root.root.type == bfd_link_hash_undefined
       && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
     {
   if (h->root.root.type == bfd_link_hash_undefined
       && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
     {
index 9d24748b89872303486a28bc92628ad3773aa893..1b6515147605e35860e991b543b0208f853a43f4 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD COFF object file private structure.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 /* BFD COFF object file private structure.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -559,7 +559,7 @@ extern bfd_boolean _bfd_coff_generic_relocate_section
 extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
   (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 extern bfd_boolean _bfd_coff_write_global_sym
 extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
   (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 extern bfd_boolean _bfd_coff_write_global_sym
-  (struct coff_link_hash_entry *, void *);
+  (struct bfd_hash_entry *, void *);
 extern bfd_boolean _bfd_coff_write_task_globals
   (struct coff_link_hash_entry *, void *);
 extern bfd_boolean _bfd_coff_link_input_bfd
 extern bfd_boolean _bfd_coff_write_task_globals
   (struct coff_link_hash_entry *, void *);
 extern bfd_boolean _bfd_coff_link_input_bfd
index 4f73f109de8ef9611228abb13184127e34a3f2ef..37b05d197018d6f4a3c33032182c8911ebed66a9 100644 (file)
@@ -4,7 +4,7 @@
 
 /* BFD COFF object file private structure.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 
 /* BFD COFF object file private structure.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -563,7 +563,7 @@ extern bfd_boolean _bfd_coff_generic_relocate_section
 extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
   (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 extern bfd_boolean _bfd_coff_write_global_sym
 extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
   (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 extern bfd_boolean _bfd_coff_write_global_sym
-  (struct coff_link_hash_entry *, void *);
+  (struct bfd_hash_entry *, void *);
 extern bfd_boolean _bfd_coff_write_task_globals
   (struct coff_link_hash_entry *, void *);
 extern bfd_boolean _bfd_coff_link_input_bfd
 extern bfd_boolean _bfd_coff_write_task_globals
   (struct coff_link_hash_entry *, void *);
 extern bfd_boolean _bfd_coff_link_input_bfd
index bac541799ff35a2ebef00898ed71640e7386a23c..e472317b791ccc066f7f9d1994bb5c3d025a938e 100644 (file)
@@ -604,21 +604,32 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
   return bfd_link_hash_lookup (info->hash, string, create, copy, follow);
 }
 
   return bfd_link_hash_lookup (info->hash, string, create, copy, follow);
 }
 
-/* Traverse a generic link hash table.  The only reason this is not a
-   macro is to do better type checking.  This code presumes that an
-   argument passed as a struct bfd_hash_entry * may be caught as a
-   struct bfd_link_hash_entry * with no explicit cast required on the
-   call.  */
+/* Traverse a generic link hash table.  Differs from bfd_hash_traverse
+   in the treatment of warning symbols.  When warning symbols are
+   created they replace the real symbol, so you don't get to see the
+   real symbol in a bfd_hash_travere.  This traversal calls func with
+   the real symbol.  */
 
 void
 bfd_link_hash_traverse
 
 void
 bfd_link_hash_traverse
-  (struct bfd_link_hash_table *table,
+  (struct bfd_link_hash_table *htab,
    bfd_boolean (*func) (struct bfd_link_hash_entry *, void *),
    void *info)
 {
    bfd_boolean (*func) (struct bfd_link_hash_entry *, void *),
    void *info)
 {
-  bfd_hash_traverse (&table->table,
-                    (bfd_boolean (*) (struct bfd_hash_entry *, void *)) func,
-                    info);
+  unsigned int i;
+
+  htab->table.frozen = 1;
+  for (i = 0; i < htab->table.size; i++)
+    {
+      struct bfd_link_hash_entry *p;
+
+      p = (struct bfd_link_hash_entry *) htab->table.table[i];
+      for (; p != NULL; p = (struct bfd_link_hash_entry *) p->root.next)
+       if (!(*func) (p->type == bfd_link_hash_warning ? p->u.i.link : p, info))
+         goto out;
+    }
+ out:
+  htab->table.frozen = 0;
 }
 
 /* Add a symbol to the linker hash table undefs list.  */
 }
 
 /* Add a symbol to the linker hash table undefs list.  */
@@ -2442,9 +2453,6 @@ _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h,
       (struct generic_write_global_symbol_info *) data;
   asymbol *sym;
 
       (struct generic_write_global_symbol_info *) data;
   asymbol *sym;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct generic_link_hash_entry *) h->root.u.i.link;
-
   if (h->written)
     return TRUE;
 
   if (h->written)
     return TRUE;
 
@@ -3095,9 +3103,6 @@ fix_syms (struct bfd_link_hash_entry *h, void *data)
 {
   bfd *obfd = (bfd *) data;
 
 {
   bfd *obfd = (bfd *) data;
 
-  if (h->type == bfd_link_hash_warning)
-    h = h->u.i.link;
-
   if (h->type == bfd_link_hash_defined
       || h->type == bfd_link_hash_defweak)
     {
   if (h->type == bfd_link_hash_defined
       || h->type == bfd_link_hash_defweak)
     {
index 08b0010627c7c8ca04aea06f033bacf5b11c61a7..ab5a4563ab09b21224892f1a2f734a3aeb17582a 100644 (file)
@@ -1,6 +1,7 @@
 /* BFD back-end for linux flavored m68k a.out binaries.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
 /* BFD back-end for linux flavored m68k a.out binaries.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -439,9 +440,6 @@ linux_tally_symbols (h, data)
   struct linux_link_hash_entry *h1, *h2;
   bfd_boolean exists;
 
   struct linux_link_hash_entry *h1, *h2;
   bfd_boolean exists;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
-
   if (h->root.root.type == bfd_link_hash_undefined
       && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
     {
   if (h->root.root.type == bfd_link_hash_undefined
       && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
     {
index 8cb87e4a72e551e6022aa5dc37e496faf660c999..e815a4304f23cc30ea69d99b79c1f7864aacf026 100644 (file)
@@ -2892,8 +2892,9 @@ aout_link_includes_newfunc (struct bfd_hash_entry *entry,
 }
 
 static bfd_boolean
 }
 
 static bfd_boolean
-aout_link_write_other_symbol (struct aout_link_hash_entry *h, void * data)
+aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data)
 {
 {
+  struct aout_link_hash_entry *h = (struct aout_link_hash_entry *) bh;
   struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
   bfd *output_bfd;
   int type;
   struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
   bfd *output_bfd;
   int type;
@@ -3056,7 +3057,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *finfo,
             symbol.  */
          h->indx = -2;
          h->written = FALSE;
             symbol.  */
          h->indx = -2;
          h->written = FALSE;
-         if (! aout_link_write_other_symbol (h, (void *) finfo))
+         if (!aout_link_write_other_symbol (&h->root.root, finfo))
            return FALSE;
          r_index = h->indx;
        }
            return FALSE;
          r_index = h->indx;
        }
@@ -3335,8 +3336,8 @@ pdp11_aout_link_input_section (struct aout_final_link_info *finfo,
                            {
                              h->indx = -2;
                              h->written = FALSE;
                            {
                              h->indx = -2;
                              h->written = FALSE;
-                             if (! aout_link_write_other_symbol (h,
-                                                                 (void *) finfo))
+                             if (!aout_link_write_other_symbol (&h->root.root,
+                                                                finfo))
                                return FALSE;
                            }
                          r_index = h->indx;
                                return FALSE;
                            }
                          r_index = h->indx;
@@ -3799,7 +3800,7 @@ NAME (aout, final_link) (bfd *abfd,
     h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
                               FALSE, FALSE, FALSE);
     if (h != NULL)
     h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
                               FALSE, FALSE, FALSE);
     if (h != NULL)
-      aout_link_write_other_symbol (h, &aout_info);
+      aout_link_write_other_symbol (&h->root.root, &aout_info);
   }
 
   /* The most time efficient way to do the link would be to read all
   }
 
   /* The most time efficient way to do the link would be to read all
@@ -3871,9 +3872,9 @@ NAME (aout, final_link) (bfd *abfd,
     }
 
   /* Write out any symbols that we have not already written out.  */
     }
 
   /* Write out any symbols that we have not already written out.  */
-  aout_link_hash_traverse (aout_hash_table (info),
-                          aout_link_write_other_symbol,
-                          (void *) &aout_info);
+  bfd_hash_traverse (&info->hash->table,
+                    aout_link_write_other_symbol,
+                    &aout_info);
 
   /* Now handle any relocs we were asked to create by the linker.
      These did not come from any input file.  We must do these after
 
   /* Now handle any relocs we were asked to create by the linker.
      These did not come from any input file.  We must do these after
index 7bb10d8e03b5c699fc978d097568601ff6be3c6f..b7fef220643d92ebf969d1185ed6a455c4df5a6b 100644 (file)
@@ -1,6 +1,7 @@
 /* BFD back-end for linux flavored sparc a.out binaries.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
 /* BFD back-end for linux flavored sparc a.out binaries.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -433,9 +434,6 @@ linux_tally_symbols (struct linux_link_hash_entry *h, void * data)
   struct linux_link_hash_entry *h1, *h2;
   bfd_boolean exists;
 
   struct linux_link_hash_entry *h1, *h2;
   bfd_boolean exists;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
-
   if (h->root.root.type == bfd_link_hash_undefined
       && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
     {
   if (h->root.root.type == bfd_link_hash_undefined
       && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
     {
index 67880b2ce6289853d8ee67cbf32d462fcd578057..8ef25edbb1cfa9cf045375664caa72c8b3f2094a 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD backend for SunOS binaries.
    Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
 /* BFD backend for SunOS binaries.
    Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -1749,9 +1749,6 @@ sunos_scan_dynamic_symbol (struct sunos_link_hash_entry *h, void * data)
 {
   struct bfd_link_info *info = (struct bfd_link_info *) data;
 
 {
   struct bfd_link_info *info = (struct bfd_link_info *) data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct sunos_link_hash_entry *) h->root.root.u.i.link;
-
   /* Set the written flag for symbols we do not want to write out as
      part of the regular symbol table.  This is all symbols which are
      not defined in a regular object file.  For some reason symbols
   /* Set the written flag for symbols we do not want to write out as
      part of the regular symbol table.  This is all symbols which are
      not defined in a regular object file.  For some reason symbols
index 45828c752942fe09992d88a26c246626a4b2121e..92bf444f231fedc8cf6e3d0c533a5eaf13acd1e4 100644 (file)
@@ -8600,21 +8600,31 @@ alpha_vms_build_fixups (struct bfd_link_info *info)
   return TRUE;
 }
 
   return TRUE;
 }
 
-/* Called by bfd_link_hash_traverse to fill the symbol table.
+/* Called by bfd_hash_traverse to fill the symbol table.
    Return FALSE in case of failure.  */
 
 static bfd_boolean
    Return FALSE in case of failure.  */
 
 static bfd_boolean
-alpha_vms_link_output_symbol (struct bfd_link_hash_entry *hc, void *infov)
+alpha_vms_link_output_symbol (struct bfd_hash_entry *bh, void *infov)
 {
 {
+  struct bfd_link_hash_entry *hc = (struct bfd_link_hash_entry *) bh;
   struct bfd_link_info *info = (struct bfd_link_info *)infov;
   struct bfd_link_info *info = (struct bfd_link_info *)infov;
-  struct alpha_vms_link_hash_entry *h = (struct alpha_vms_link_hash_entry *)hc;
+  struct alpha_vms_link_hash_entry *h;
   struct vms_symbol_entry *sym;
 
   struct vms_symbol_entry *sym;
 
+  if (hc->type == bfd_link_hash_warning)
+    {
+      hc = hc->u.i.link;
+      if (hc->type == bfd_link_hash_new)
+       return TRUE;
+    }
+  h = (struct alpha_vms_link_hash_entry *) hc;
+
   switch (h->root.type)
     {
     case bfd_link_hash_undefined:
       return TRUE;
     case bfd_link_hash_new:
   switch (h->root.type)
     {
     case bfd_link_hash_undefined:
       return TRUE;
     case bfd_link_hash_new:
+    case bfd_link_hash_warning:
       abort ();
     case bfd_link_hash_undefweak:
       return TRUE;
       abort ();
     case bfd_link_hash_undefweak:
       return TRUE;
@@ -8634,7 +8644,6 @@ alpha_vms_link_output_symbol (struct bfd_link_hash_entry *hc, void *infov)
     case bfd_link_hash_common:
       break;
     case bfd_link_hash_indirect:
     case bfd_link_hash_common:
       break;
     case bfd_link_hash_indirect:
-    case bfd_link_hash_warning:
       return TRUE;
     }
 
       return TRUE;
     }
 
@@ -8740,7 +8749,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
   /* Generate the symbol table.  */
   BFD_ASSERT (PRIV (syms) == NULL);
   if (info->strip != strip_all)
   /* Generate the symbol table.  */
   BFD_ASSERT (PRIV (syms) == NULL);
   if (info->strip != strip_all)
-    bfd_link_hash_traverse (info->hash, alpha_vms_link_output_symbol, info);
+    bfd_hash_traverse (&info->hash->table, alpha_vms_link_output_symbol, info);
 
   /* Find the entry point.  */
   if (bfd_get_start_address (abfd) == 0)
 
   /* Find the entry point.  */
   if (bfd_get_start_address (abfd) == 0)
index 4308b1869889b59bde01a17b978b21139b4f1757..4adfb1746699af54da617d750331ae3d633182cc 100644 (file)
@@ -3354,9 +3354,6 @@ xcoff_post_gc_symbol (struct xcoff_link_hash_entry *h, void * p)
 {
   struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p;
 
 {
   struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct xcoff_link_hash_entry *) h->root.u.i.link;
-
   /* __rtinit, this symbol has special handling. */
   if (h->flags & XCOFF_RTINIT)
     return TRUE;
   /* __rtinit, this symbol has special handling. */
   if (h->flags & XCOFF_RTINIT)
     return TRUE;
@@ -5152,8 +5149,9 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo)
 /* Write out a non-XCOFF global symbol.  */
 
 static bfd_boolean
 /* Write out a non-XCOFF global symbol.  */
 
 static bfd_boolean
-xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf)
+xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf)
 {
 {
+  struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) bh;
   struct xcoff_final_link_info *flinfo = (struct xcoff_final_link_info *) inf;
   bfd *output_bfd;
   bfd_byte *outsym;
   struct xcoff_final_link_info *flinfo = (struct xcoff_final_link_info *) inf;
   bfd *output_bfd;
   bfd_byte *outsym;
@@ -6237,9 +6235,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
 
   /* Write out all the global symbols which do not come from XCOFF
      input files.  */
 
   /* Write out all the global symbols which do not come from XCOFF
      input files.  */
-  xcoff_link_hash_traverse (xcoff_hash_table (info),
-                           xcoff_write_global_symbol,
-                           (void *) &flinfo);
+  bfd_hash_traverse (&info->hash->table, xcoff_write_global_symbol, &flinfo);
 
   if (flinfo.outsyms != NULL)
     {
 
   if (flinfo.outsyms != NULL)
     {