+2014-06-13 Alan Modra <amodra@gmail.com>
+
+ PR 17047
+ * targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
+ (struct bfd_target <_bfd_link_hash_table_free>): Delete.
+ * bfd.c (bfd_link_hash_table_free): Don't define.
+ * aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
+ * coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
+ * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
+ * elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
+ * elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
+ * elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
+ * elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
+ * libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
+ * nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
+ * srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
+ * xsym.c: Don't define various link_hash_table_free defines, and
+ remove from bfd_target vars. Temporarily reference some of the
+ target link_hash_table_free functions to avoid warnings.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
2014-06-13 Alan Modra <amodra@gmail.com>
* elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c,
#define aout_32_section_already_linked _bfd_generic_section_already_linked
#define aout_32_bfd_define_common_symbol bfd_generic_define_common_symbol
#define aout_32_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define aout_32_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define aout_32_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define aout_32_bfd_link_just_syms _bfd_generic_link_just_syms
#define aout_32_bfd_copy_link_hash_symbol_type \
#ifndef MY_bfd_link_hash_table_create
#define MY_bfd_link_hash_table_create NAME (aout, link_hash_table_create)
#endif
-#ifndef MY_bfd_link_hash_table_free
-#define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#endif
#ifndef MY_bfd_link_add_symbols
#define MY_bfd_link_add_symbols NAME (aout, link_add_symbols)
#endif
#ifndef MY_bfd_link_hash_table_create
#define MY_bfd_link_hash_table_create NAME (aout, link_hash_table_create)
#endif
-#ifndef MY_bfd_link_hash_table_free
-#define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#endif
#ifndef MY_bfd_link_add_symbols
#define MY_bfd_link_add_symbols NAME (aout, link_add_symbols)
#endif
#define bfd_link_hash_table_create(abfd) \
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-#define bfd_link_hash_table_free(abfd, hash) \
- BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
-
#define bfd_link_add_symbols(abfd, info) \
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
NAME##_bfd_get_relocated_section_contents, \
NAME##_bfd_relax_section, \
NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_hash_table_free, \
NAME##_bfd_link_add_symbols, \
NAME##_bfd_link_just_syms, \
NAME##_bfd_copy_link_hash_symbol_type, \
struct bfd_link_hash_table *
(*_bfd_link_hash_table_create) (bfd *);
- /* Release the memory associated with the linker hash table. */
- void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
-
/* Add symbols from this object file into the hash table. */
bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
.#define bfd_link_hash_table_create(abfd) \
. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
.
-.#define bfd_link_hash_table_free(abfd, hash) \
-. BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
-.
.#define bfd_link_add_symbols(abfd, info) \
. BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
.
#define binary_section_already_linked _bfd_generic_section_already_linked
#define binary_bfd_define_common_symbol bfd_generic_define_common_symbol
#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
#define binary_bfd_copy_link_hash_symbol_type \
_bfd_generic_copy_link_hash_symbol_type
#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
#define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define b_out_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define b_out_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define b_out_bfd_link_just_syms _bfd_generic_link_just_syms
#define b_out_bfd_copy_link_hash_symbol_type \
bfd_generic_get_relocated_section_contents,
bfd_generic_relax_section,
_bfd_xcoff_bfd_link_hash_table_create,
- _bfd_generic_link_hash_table_free,
_bfd_xcoff_bfd_link_add_symbols,
_bfd_generic_link_just_syms,
_bfd_generic_copy_link_hash_symbol_type,
bfd_generic_get_relocated_section_contents,
bfd_generic_relax_section,
_bfd_xcoff_bfd_link_hash_table_create,
- _bfd_generic_link_hash_table_free,
_bfd_xcoff_bfd_link_add_symbols,
_bfd_generic_link_just_syms,
_bfd_generic_copy_link_hash_symbol_type,
}
#endif
-#ifndef coff_bfd_link_hash_table_free
-#define coff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#endif
-
/* If coff_relocate_section is defined, we can use the optimized COFF
backend linker. Otherwise we must continue to use the old linker. */
free (ret);
return NULL;
}
+ (void) elf32_mn10300_link_hash_table_free;
return & ret->root.root;
}
mn10300_elf_get_relocated_section_contents
#define bfd_elf32_bfd_link_hash_table_create \
elf32_mn10300_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free \
- elf32_mn10300_link_hash_table_free
#ifndef elf_symbol_leading_char
#define elf_symbol_leading_char '_'
free (ret);
return NULL;
}
+ (void) elf32_arm_link_hash_table_free;
return &ret->root.root;
}
#define bfd_elf32_bfd_set_private_flags elf32_arm_set_private_flags
#define bfd_elf32_bfd_print_private_bfd_data elf32_arm_print_private_bfd_data
#define bfd_elf32_bfd_link_hash_table_create elf32_arm_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free elf32_arm_link_hash_table_free
#define bfd_elf32_bfd_reloc_type_lookup elf32_arm_reloc_type_lookup
#define bfd_elf32_bfd_reloc_name_lookup elf32_arm_reloc_name_lookup
#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
if (!bfd_hash_table_init (&htab->bstab, stub_hash_newfunc,
sizeof (struct elf32_avr_stub_hash_entry)))
return NULL;
+ (void) elf32_avr_link_hash_table_free;
return &htab->etab.root;
}
#define TARGET_LITTLE_NAME "elf32-avr"
#define bfd_elf32_bfd_link_hash_table_create elf32_avr_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free elf32_avr_link_hash_table_free
#define elf_info_to_howto avr_info_to_howto_rela
#define elf_info_to_howto_rel NULL
if (!bfd_hash_table_init (&htab->bstab, stub_hash_newfunc,
sizeof (struct elf32_hppa_stub_hash_entry)))
return NULL;
+ (void) elf32_hppa_link_hash_table_free;
htab->text_segment_base = (bfd_vma) -1;
htab->data_segment_base = (bfd_vma) -1;
/* Stuff for the BFD linker. */
#define bfd_elf32_bfd_final_link elf32_hppa_final_link
#define bfd_elf32_bfd_link_hash_table_create elf32_hppa_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free elf32_hppa_link_hash_table_free
#define elf_backend_adjust_dynamic_symbol elf32_hppa_adjust_dynamic_symbol
#define elf_backend_copy_indirect_symbol elf32_hppa_copy_indirect_symbol
#define elf_backend_check_relocs elf32_hppa_check_relocs
free (ret);
return NULL;
}
+ (void) elf_i386_link_hash_table_free;
return &ret->elf.root;
}
#define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name
#define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free elf_i386_link_hash_table_free
#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup
#define bfd_elf32_bfd_reloc_name_lookup elf_i386_reloc_name_lookup
#define bfd_elf32_bfd_link_hash_table_create \
m68hc11_elf_bfd_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free \
- m68hc11_elf_bfd_link_hash_table_free
#define bfd_elf32_bfd_merge_private_bfd_data \
_bfd_m68hc11_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags _bfd_m68hc11_elf_set_private_flags
#define bfd_elf32_bfd_link_hash_table_create \
m68hc12_elf_bfd_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free \
- m68hc11_elf_bfd_link_hash_table_free
#define bfd_elf32_bfd_merge_private_bfd_data \
_bfd_m68hc11_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags _bfd_m68hc11_elf_set_private_flags
free (ret);
return NULL;
}
+ (void) elf_m68k_link_hash_table_free;
ret->multi_got_.global_symndx = 1;
_bfd_elf_create_dynamic_sections
#define bfd_elf32_bfd_link_hash_table_create \
elf_m68k_link_hash_table_create
-/* ??? Should it be this macro or bfd_elfNN_bfd_link_hash_table_create? */
-#define bfd_elf32_bfd_link_hash_table_free \
- elf_m68k_link_hash_table_free
#define bfd_elf32_bfd_final_link bfd_elf_final_link
#define elf_backend_check_relocs elf_m68k_check_relocs
if (!bfd_hash_table_init (&htab->bstab, stub_hash_newfunc,
sizeof (struct elf_metag_stub_hash_entry)))
return NULL;
+ (void) elf_metag_link_hash_table_free;
return &htab->etab.root;
}
#define bfd_elf32_bfd_is_local_label_name elf_metag_is_local_label_name
#define bfd_elf32_bfd_link_hash_table_create \
elf_metag_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free elf_metag_link_hash_table_free
#define elf_backend_relocate_section elf_metag_relocate_section
#define elf_backend_gc_mark_hook elf_metag_gc_mark_hook
#define elf_backend_gc_sweep_hook elf_metag_gc_sweep_hook
if (!bfd_hash_table_init (&ret->bstab, stub_hash_newfunc,
sizeof (struct elf32_nios2_stub_hash_entry)))
return NULL;
+ (void) nios2_elf32_link_hash_table_free;
return &ret->root.root;
}
#define bfd_elf32_bfd_link_hash_table_create \
nios2_elf32_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free \
- nios2_elf32_link_hash_table_free
/* Relocation table lookup macros. */
_bfd_sparc_elf_reloc_name_lookup
#define bfd_elf32_bfd_link_hash_table_create \
_bfd_sparc_elf_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free \
- _bfd_sparc_elf_link_hash_table_free
#define bfd_elf32_bfd_relax_section _bfd_sparc_elf_relax_section
#define bfd_elf32_new_section_hook _bfd_sparc_elf_new_section_hook
#define elf_backend_copy_indirect_symbol \
#define elf_backend_add_symbol_hook elf32_xgate_add_symbol_hook
#define bfd_elf32_bfd_link_hash_table_create xgate_elf_bfd_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free xgate_elf_bfd_link_hash_table_free
#define bfd_elf32_bfd_merge_private_bfd_data _bfd_xgate_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags _bfd_xgate_elf_set_private_flags
#define bfd_elf32_bfd_print_private_bfd_data _bfd_xgate_elf_print_private_bfd_data
free (ret);
return NULL;
}
+ (void) elf64_ia64_link_hash_table_free;
return &ret->root.root;
}
/* Stuff for the BFD linker: */
#define bfd_elf64_bfd_link_hash_table_create \
elf64_ia64_hash_table_create
-#define bfd_elf64_bfd_link_hash_table_free \
- elf64_ia64_link_hash_table_free
#define elf_backend_create_dynamic_sections \
elf64_ia64_create_dynamic_sections
#define elf_backend_check_relocs \
#define bfd_elf64_bfd_print_private_bfd_data ppc64_elf_print_private_bfd_data
#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
-#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
#define bfd_elf64_get_synthetic_symtab ppc64_elf_get_synthetic_symtab
#define bfd_elf64_bfd_link_just_syms ppc64_elf_link_just_syms
_bfd_elf_link_hash_table_free ((struct bfd_link_hash_table *) htab);
return NULL;
}
+ (void) ppc64_elf_link_hash_table_free;
/* Initializing two fields of the union is just cosmetic. We really
only care about glist, but when compiled on a 32-bit host the
_bfd_sparc_elf_plt_sym_val
#define bfd_elf64_bfd_link_hash_table_create \
_bfd_sparc_elf_link_hash_table_create
-#define bfd_elf64_bfd_link_hash_table_free \
- _bfd_sparc_elf_link_hash_table_free
#define elf_info_to_howto \
_bfd_sparc_elf_info_to_howto
#define elf_backend_copy_indirect_symbol \
free (ret);
return NULL;
}
+ (void) elf_x86_64_link_hash_table_free;
return &ret->elf.root;
}
#define bfd_elf64_bfd_link_hash_table_create \
elf_x86_64_link_hash_table_create
-#define bfd_elf64_bfd_link_hash_table_free \
- elf_x86_64_link_hash_table_free
#define bfd_elf64_bfd_reloc_type_lookup elf_x86_64_reloc_type_lookup
#define bfd_elf64_bfd_reloc_name_lookup \
elf_x86_64_reloc_name_lookup
#define bfd_elf32_bfd_link_hash_table_create \
elf_x86_64_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free \
- elf_x86_64_link_hash_table_free
#define bfd_elf32_bfd_reloc_type_lookup \
elf_x86_64_reloc_type_lookup
#define bfd_elf32_bfd_reloc_name_lookup \
free (ret);
return NULL;
}
+ (void) elfNN_aarch64_link_hash_table_free;
return &ret->root.root;
}
#define bfd_elfNN_bfd_link_hash_table_create \
elfNN_aarch64_link_hash_table_create
-#define bfd_elfNN_bfd_link_hash_table_free \
- elfNN_aarch64_link_hash_table_free
-
#define bfd_elfNN_bfd_merge_private_bfd_data \
elfNN_aarch64_merge_private_bfd_data
free (ret);
return NULL;
}
+ (void) elfNN_ia64_link_hash_table_free;
return &ret->root.root;
}
/* Stuff for the BFD linker: */
#define bfd_elfNN_bfd_link_hash_table_create \
elfNN_ia64_hash_table_create
-#define bfd_elfNN_bfd_link_hash_table_free \
- elfNN_ia64_link_hash_table_free
#define elf_backend_create_dynamic_sections \
elfNN_ia64_create_dynamic_sections
#define elf_backend_check_relocs \
#ifndef bfd_elfNN_bfd_link_hash_table_create
#define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
#endif
-#ifndef bfd_elfNN_bfd_link_hash_table_free
-#define bfd_elfNN_bfd_link_hash_table_free _bfd_elf_link_hash_table_free
-#endif
#ifndef bfd_elfNN_bfd_link_add_symbols
#define bfd_elfNN_bfd_link_add_symbols bfd_elf_link_add_symbols
#endif
#define bfd_elfNN_bfd_link_hash_table_create \
_bfd_generic_link_hash_table_create
#endif
-#ifndef bfd_elfNN_bfd_link_hash_table_free
-#define bfd_elfNN_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#endif
#ifndef bfd_elfNN_bfd_link_add_symbols
#define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
#endif
_bfd_generic_section_already_linked
#define msdos_bfd_define_common_symbol bfd_generic_define_common_symbol
#define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define msdos_bfd_link_just_syms _bfd_generic_link_just_syms
#define msdos_bfd_copy_link_hash_symbol_type \
_bfd_generic_section_already_linked
#define os9k_bfd_define_common_symbol bfd_generic_define_common_symbol
#define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define os9k_bfd_link_just_syms _bfd_generic_link_just_syms
#define os9k_bfd_copy_link_hash_symbol_type \
_bfd_generic_section_already_linked
#define ieee_bfd_define_common_symbol bfd_generic_define_common_symbol
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
#define ieee_bfd_copy_link_hash_symbol_type \
/* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents,
ieee_bfd_relax_section, ieee_bfd_link_hash_table_create,
- _bfd_generic_link_hash_table_free,
ieee_bfd_link_add_symbols, ieee_bfd_final_link,
ieee_bfd_link_split_section, ieee_bfd_gc_sections,
ieee_bfd_merge_sections. */
#define ihex_section_already_linked _bfd_generic_section_already_linked
#define ihex_bfd_define_common_symbol bfd_generic_define_common_symbol
#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ihex_bfd_link_just_syms _bfd_generic_link_just_syms
#define ihex_bfd_copy_link_hash_symbol_type \
bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) (bfd *)) bfd_nullvoidptr)
-#define _bfd_nolink_bfd_link_hash_table_free \
- ((void (*) (struct bfd_link_hash_table *)) bfd_void)
#define _bfd_nolink_bfd_link_add_symbols \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_just_syms \
bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) (bfd *)) bfd_nullvoidptr)
-#define _bfd_nolink_bfd_link_hash_table_free \
- ((void (*) (struct bfd_link_hash_table *)) bfd_void)
#define _bfd_nolink_bfd_link_add_symbols \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_just_syms \
/* ecoff_bfd_relax_section defined by backend. */
extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create
(bfd *);
-#define _bfd_ecoff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
extern bfd_boolean _bfd_ecoff_bfd_link_add_symbols
(bfd *, struct bfd_link_info *);
#define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_mach_o_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define bfd_mach_o_bfd_relax_section bfd_generic_relax_section
#define bfd_mach_o_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define bfd_mach_o_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_mach_o_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_mach_o_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_mach_o_bfd_copy_link_hash_symbol_type \
#define mmo_bfd_gc_sections bfd_generic_gc_sections
#define mmo_bfd_lookup_section_flags bfd_generic_lookup_section_flags
#define mmo_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define mmo_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define mmo_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define mmo_bfd_link_just_syms _bfd_generic_link_just_syms
#define mmo_bfd_copy_link_hash_symbol_type \
#define nlm_section_already_linked _bfd_generic_section_already_linked
#define nlm_bfd_define_common_symbol bfd_generic_define_common_symbol
#define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define nlm_bfd_link_just_syms _bfd_generic_link_just_syms
#define nlm_bfd_copy_link_hash_symbol_type \
#define oasys_section_already_linked _bfd_generic_section_already_linked
#define oasys_bfd_define_common_symbol bfd_generic_define_common_symbol
#define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define oasys_bfd_link_just_syms _bfd_generic_link_just_syms
#define oasys_bfd_copy_link_hash_symbol_type \
#define bfd_pef_section_already_linked _bfd_generic_section_already_linked
#define bfd_pef_bfd_define_common_symbol bfd_generic_define_common_symbol
#define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_pef_bfd_copy_link_hash_symbol_type \
#define bfd_plugin_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define bfd_plugin_bfd_relax_section bfd_generic_relax_section
#define bfd_plugin_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define bfd_plugin_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_plugin_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_plugin_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_plugin_bfd_final_link _bfd_generic_final_link
_bfd_generic_section_already_linked
#define ppcboot_bfd_define_common_symbol bfd_generic_define_common_symbol
#define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ppcboot_bfd_link_just_syms _bfd_generic_link_just_syms
#define ppcboot_bfd_copy_link_hash_symbol_type \
#define som_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define som_bfd_relax_section bfd_generic_relax_section
#define som_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define som_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define som_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define som_bfd_link_just_syms _bfd_generic_link_just_syms
#define som_bfd_copy_link_hash_symbol_type \
#define srec_section_already_linked _bfd_generic_section_already_linked
#define srec_bfd_define_common_symbol bfd_generic_define_common_symbol
#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define srec_bfd_link_just_syms _bfd_generic_link_just_syms
#define srec_bfd_copy_link_hash_symbol_type \
. NAME##_bfd_get_relocated_section_contents, \
. NAME##_bfd_relax_section, \
. NAME##_bfd_link_hash_table_create, \
-. NAME##_bfd_link_hash_table_free, \
. NAME##_bfd_link_add_symbols, \
. NAME##_bfd_link_just_syms, \
. NAME##_bfd_copy_link_hash_symbol_type, \
. struct bfd_link_hash_table *
. (*_bfd_link_hash_table_create) (bfd *);
.
-. {* Release the memory associated with the linker hash table. *}
-. void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
-.
. {* Add symbols from this object file into the hash table. *}
. bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
.
#define tekhex_section_already_linked _bfd_generic_section_already_linked
#define tekhex_bfd_define_common_symbol bfd_generic_define_common_symbol
#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms
#define tekhex_bfd_copy_link_hash_symbol_type \
#define verilog_bfd_discard_group bfd_generic_discard_group
#define verilog_section_already_linked _bfd_generic_section_already_linked
#define verilog_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define verilog_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define verilog_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define verilog_bfd_link_just_syms _bfd_generic_link_just_syms
#define verilog_bfd_final_link _bfd_generic_final_link
#define versados_section_already_linked _bfd_generic_section_already_linked
#define versados_bfd_define_common_symbol bfd_generic_define_common_symbol
#define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define versados_bfd_link_just_syms _bfd_generic_link_just_syms
#define versados_bfd_copy_link_hash_symbol_type \
_bfd_generic_section_already_linked
#define alpha_vms_bfd_define_common_symbol bfd_generic_define_common_symbol
-#define alpha_vms_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define alpha_vms_bfd_link_just_syms _bfd_generic_link_just_syms
#define alpha_vms_bfd_copy_link_hash_symbol_type \
_bfd_generic_copy_link_hash_symbol_type
#define bfd_sym_section_already_linked _bfd_generic_section_already_linked
#define bfd_sym_bfd_define_common_symbol bfd_generic_define_common_symbol
#define bfd_sym_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define bfd_sym_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_sym_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_sym_bfd_copy_link_hash_symbol_type \
+2014-06-13 Alan Modra <amodra@gmail.com>
+
+ PR 17047
+ * ldlang.c (output_bfd_hash_table_free_fn): Delete.
+ (open_output): Don't set it..
+ * ldmain.c (ld_cleanup): ..or call it.
+
2014-06-13 Alan Modra <amodra@gmail.com>
* emultempl/cr16elf.em, * emultempl/elf32.em, * emultempl/genelf.em,
return default_target;
}
-/* Stashed function to free link_info.hash; see open_output. */
-void (*output_bfd_hash_table_free_fn) (struct bfd_link_hash_table *);
-
/* Open the output file. */
static void
if (link_info.hash == NULL)
einfo (_("%P%F: can not create hash table: %E\n"));
- /* We want to please memory leak checkers by deleting link_info.hash.
- We can't do it in lang_finish, as a bfd target may hold references to
- symbols in this table and use them when their _bfd_write_contents
- function is invoked, as part of bfd_close on the output_bfd. But,
- output_bfd is deallocated at bfd_close, so we can't refer to
- output_bfd after that time, and dereferencing it is needed to call
- "bfd_link_hash_table_free". Smash this dependency deadlock and grab
- the function pointer; arrange to call it on link_info.hash in
- ld_cleanup. */
- output_bfd_hash_table_free_fn
- = link_info.output_bfd->xvec->_bfd_link_hash_table_free;
-
bfd_set_gp_size (link_info.output_bfd, g_switch_value);
}
#endif
if (output_filename && delete_output_file_on_failure)
unlink_if_ordinary (output_filename);
-
- /* See open_output in ldlang.c. */
- if (output_bfd_hash_table_free_fn != NULL)
- (*output_bfd_hash_table_free_fn) (link_info.hash);
}
/* If there's a BFD assertion, we'll notice and exit with an error