diff options
author | Alan Modra <amodra@gmail.com> | 2002-03-28 03:27:46 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-03-28 03:27:46 +0000 |
commit | e92d460e59b5271ec44858eecd5b0957eb75ea12 (patch) | |
tree | c875ac49157ba6262d0b0aceb8fa6ce6c688f1b4 /bfd/cofflink.c | |
parent | 48b2f8d70e2630718ebc1a9b563c02aecc4e36ed (diff) | |
download | gdb-e92d460e59b5271ec44858eecd5b0957eb75ea12.zip gdb-e92d460e59b5271ec44858eecd5b0957eb75ea12.tar.gz gdb-e92d460e59b5271ec44858eecd5b0957eb75ea12.tar.bz2 |
* linker.c (link_action): Ignore duplicate warning syms.
(_bfd_generic_link_write_global_symbol): Follow warning symbol link.
* elflink.h (elf_adjust_dynstr_offsets): Likewise.
(elf_adjust_dynamic_symbol): Likewise.
(elf_export_symbol): Likewise.
(elf_link_find_version_dependencies): Likewise.
(elf_link_assign_sym_version): Likewise.
(elf_link_sec_merge_syms): Likewise.
(elf_link_output_extsym): Likewise.
(elf_gc_sweep_symbol): Likewise.
(elf_gc_propagate_vtable_entries_used): Likewise.
(elf_gc_smash_unused_vtentry_relocs): Likewise.
(elf_gc_allocate_got_offsets): Likewise.
(elf_collect_hash_codes): Likewise.
* elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
* elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
(elf_hppa_remark_useless_dynamic_symbols): Likewise.
* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
* elf32-arm.h (elf32_arm_discard_copies): Likewise.
* elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
(elf_cris_discard_excess_dso_dynamics): Likewise.
* elf32-hppa.c (clobber_millicode_symbols): Likewise.
(mark_PIC_calls): Likewise.
(allocate_plt_static): Likewise.
(allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
* elf32-i386.c (allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
* elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
* elf32-m68k.c (elf_m68k_discard_copies): Likewise.
* elf32-mips.c (mips_elf_output_extsym): Likewise.
(mips_elf_sort_hash_table_f): Likewise.
(mips_elf_check_mips16_stubs): Likewise.
* elf32-s390.c (allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
* elf32-sh.c (sh_elf_discard_copies): Likewise.
* elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
(xstormy16_relax_plt_realloc): Likewise.
* elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
(elf64_alpha_output_extsym): Likewise.
* elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
* elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
(mips_elf64_check_mips16_stubs): Likewise.
(mips_elf64_output_extsym): Likewise.
* elf64-ppc.c (func_desc_adjust): Likewise.
(allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
* elf64-s390.c (allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
* elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
* elf64-x86-64.c (allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
* elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
* aoutx.h (aout_link_write_other_symbol): Likewise.
* cofflink.c (_bfd_coff_write_task_globals): Likewise.
(_bfd_coff_write_global_sym): Likewise.
* i386linux.c (linux_tally_symbols): Likewise.
* m68klinux.c (linux_tally_symbols): Likewise.
* sparclinux.c (linux_tally_symbols): Likewise.
* pdp11.c (aout_link_write_other_symbol): Likewise.
* sunos.c (sunos_scan_dynamic_symbol): Likewise.
* xcofflink.c (xcoff_build_ldsyms): Likewise.
(xcoff_write_global_symbol): Likewise.
* cofflink.c (_bfd_coff_final_link): Formatting.
* cpu-mips.c (mips_compatible): Make static, prototype.
* elf32-i386.c (elf_i386_check_relocs): Formatting.
* elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
* elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
* elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
(mips_elf64_final_link): Likewise.
* elflink.h (elf_link_find_version_dependencies): Remove duplicate
prototype.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r-- | bfd/cofflink.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 00a5289..8a80c14 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -1,5 +1,5 @@ /* COFF specific linker code. - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -1005,7 +1005,8 @@ _bfd_coff_final_link (abfd, info) if (info->task_link) { finfo.failed = false; - coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_task_globals, + coff_link_hash_traverse (coff_hash_table (info), + _bfd_coff_write_task_globals, (PTR) &finfo); if (finfo.failed) goto error_return; @@ -1013,7 +1014,8 @@ _bfd_coff_final_link (abfd, info) /* Write out the global symbols. */ finfo.failed = false; - coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym, + coff_link_hash_traverse (coff_hash_table (info), + _bfd_coff_write_global_sym, (PTR) &finfo); if (finfo.failed) goto error_return; @@ -2497,6 +2499,13 @@ _bfd_coff_write_global_sym (h, data) output_bfd = finfo->output_bfd; + if (h->root.type == bfd_link_hash_warning) + { + h = (struct coff_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } + if (h->indx >= 0) return true; @@ -2512,6 +2521,7 @@ _bfd_coff_write_global_sym (h, data) { default: case bfd_link_hash_new: + case bfd_link_hash_warning: abort (); return false; @@ -2544,7 +2554,6 @@ _bfd_coff_write_global_sym (h, data) break; case bfd_link_hash_indirect: - case bfd_link_hash_warning: /* Just ignore these. They can't be handled anyhow. */ return true; } @@ -2699,6 +2708,9 @@ _bfd_coff_write_task_globals (h, data) boolean rtnval = true; boolean save_global_to_static; + if (h->root.type == bfd_link_hash_warning) + h = (struct coff_link_hash_entry *) h->root.u.i.link; + if (h->indx < 0) { switch (h->root.type) |