Don't call bfd_link_hash_table_free
Freeing the linker hash table is a royal pain. It can't be freed before the _bfd_write_contents call in bfd_close, because some target bfd_write_contents functions access the hash table. It can't be freed after bfd_close either, since bfd_alloc memory holding side data structures disappears (PR17047). Clearly the only place it can be freed is actually in bfd_close. This patch doesn't do that, but kills off the existing means of freeing the hash table via a bfd target xvec call. bfd/ 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. ld/ PR 17047 * ldlang.c (output_bfd_hash_table_free_fn): Delete. (open_output): Don't set it.. * ldmain.c (ld_cleanup): ..or call it.
This commit is contained in:
parent
68faa6378d
commit
caa4096e84
@ -1,3 +1,25 @@
|
||||
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,
|
||||
|
@ -464,7 +464,6 @@ aout_adobe_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED,
|
||||
#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 \
|
||||
|
@ -521,9 +521,6 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
#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
|
||||
|
@ -979,9 +979,6 @@ tic30_aout_set_arch_mach (bfd *abfd,
|
||||
#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
|
||||
|
@ -6650,9 +6650,6 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
|
||||
#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))
|
||||
|
||||
@ -7045,7 +7042,6 @@ typedef struct bfd_target
|
||||
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, \
|
||||
@ -7072,9 +7068,6 @@ typedef struct bfd_target
|
||||
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 *);
|
||||
|
||||
|
@ -1501,9 +1501,6 @@ DESCRIPTION
|
||||
.#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))
|
||||
.
|
||||
|
@ -305,7 +305,6 @@ binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
#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
|
||||
|
@ -1377,7 +1377,6 @@ b_out_bfd_get_relocated_section_contents (bfd *output_bfd,
|
||||
#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 \
|
||||
|
@ -2738,7 +2738,6 @@ const bfd_target rs6000_xcoff64_vec =
|
||||
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,
|
||||
@ -2997,7 +2996,6 @@ const bfd_target rs6000_xcoff64_aix_vec =
|
||||
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,
|
||||
|
@ -5355,10 +5355,6 @@ dummy_reloc16_extra_cases (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
}
|
||||
#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. */
|
||||
|
||||
|
@ -4652,6 +4652,7 @@ elf32_mn10300_link_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elf32_mn10300_link_hash_table_free;
|
||||
return & ret->root.root;
|
||||
}
|
||||
|
||||
@ -5581,8 +5582,6 @@ mn10300_elf_mkobject (bfd *abfd)
|
||||
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 '_'
|
||||
|
@ -3573,6 +3573,7 @@ elf32_arm_link_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elf32_arm_link_hash_table_free;
|
||||
|
||||
return &ret->root.root;
|
||||
}
|
||||
@ -16105,7 +16106,6 @@ elf32_arm_get_synthetic_symtab (bfd *abfd,
|
||||
#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
|
||||
|
@ -756,6 +756,7 @@ elf32_avr_link_hash_table_create (bfd *abfd)
|
||||
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;
|
||||
}
|
||||
@ -3249,7 +3250,6 @@ elf32_avr_build_stubs (struct bfd_link_info *info)
|
||||
#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
|
||||
|
@ -445,6 +445,7 @@ elf32_hppa_link_hash_table_create (bfd *abfd)
|
||||
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;
|
||||
@ -4625,7 +4626,6 @@ elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
|
||||
/* 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
|
||||
|
@ -973,6 +973,7 @@ elf_i386_link_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elf_i386_link_hash_table_free;
|
||||
|
||||
return &ret->elf.root;
|
||||
}
|
||||
@ -5041,7 +5042,6 @@ elf_i386_add_symbol_hook (bfd * abfd,
|
||||
|
||||
#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
|
||||
|
||||
|
@ -1305,8 +1305,6 @@ static const struct bfd_elf_special_section elf32_m68hc11_special_sections[] =
|
||||
|
||||
#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
|
||||
|
@ -655,8 +655,6 @@ static const struct bfd_elf_special_section elf32_m68hc12_special_sections[] =
|
||||
|
||||
#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
|
||||
|
@ -977,6 +977,7 @@ elf_m68k_link_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elf_m68k_link_hash_table_free;
|
||||
|
||||
ret->multi_got_.global_symndx = 1;
|
||||
|
||||
@ -4857,9 +4858,6 @@ elf_m68k_add_symbol_hook (bfd *abfd,
|
||||
_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
|
||||
|
@ -1056,6 +1056,7 @@ elf_metag_link_hash_table_create (bfd *abfd)
|
||||
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;
|
||||
}
|
||||
@ -4295,7 +4296,6 @@ elf_metag_plt_sym_val (bfd_vma i, const asection *plt,
|
||||
#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
|
||||
|
@ -5140,6 +5140,7 @@ nios2_elf32_link_hash_table_create (bfd *abfd)
|
||||
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;
|
||||
}
|
||||
@ -5250,8 +5251,6 @@ const struct bfd_elf_special_section elf32_nios2_special_sections[] =
|
||||
|
||||
#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. */
|
||||
|
||||
|
@ -209,8 +209,6 @@ elf32_sparc_add_symbol_hook (bfd * abfd,
|
||||
_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 \
|
||||
|
@ -717,7 +717,6 @@ elf32_xgate_post_process_headers (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_in
|
||||
#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
|
||||
|
@ -1070,6 +1070,7 @@ elf64_ia64_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elf64_ia64_link_hash_table_free;
|
||||
|
||||
return &ret->root.root;
|
||||
}
|
||||
@ -5458,8 +5459,6 @@ static const struct elf_size_info elf64_ia64_vms_size_info = {
|
||||
/* 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 \
|
||||
|
@ -84,7 +84,6 @@ static bfd_vma opd_entry_value
|
||||
#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
|
||||
|
||||
@ -4204,6 +4203,7 @@ ppc64_elf_link_hash_table_create (bfd *abfd)
|
||||
_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
|
||||
|
@ -864,8 +864,6 @@ const struct elf_size_info elf64_sparc_size_info =
|
||||
_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 \
|
||||
|
@ -1030,6 +1030,7 @@ elf_x86_64_link_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elf_x86_64_link_hash_table_free;
|
||||
|
||||
return &ret->elf.root;
|
||||
}
|
||||
@ -5640,8 +5641,6 @@ static const struct bfd_elf_special_section
|
||||
|
||||
#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
|
||||
@ -5913,8 +5912,6 @@ elf32_x86_64_nacl_elf_object_p (bfd *abfd)
|
||||
|
||||
#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 \
|
||||
|
@ -2114,6 +2114,7 @@ elfNN_aarch64_link_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elfNN_aarch64_link_hash_table_free;
|
||||
|
||||
return &ret->root.root;
|
||||
}
|
||||
@ -7196,9 +7197,6 @@ const struct elf_size_info elfNN_aarch64_size_info =
|
||||
#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
|
||||
|
||||
|
@ -1461,6 +1461,7 @@ elfNN_ia64_hash_table_create (bfd *abfd)
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
(void) elfNN_ia64_link_hash_table_free;
|
||||
|
||||
return &ret->root.root;
|
||||
}
|
||||
@ -5024,8 +5025,6 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
/* 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 \
|
||||
|
@ -237,9 +237,6 @@
|
||||
#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
|
||||
@ -256,9 +253,6 @@
|
||||
#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
|
||||
|
@ -150,7 +150,6 @@ msdos_set_section_contents (bfd *abfd,
|
||||
_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 \
|
||||
|
@ -174,7 +174,6 @@ os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
_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 \
|
||||
|
@ -3779,7 +3779,6 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
_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 \
|
||||
@ -3857,7 +3856,6 @@ const bfd_target ieee_vec =
|
||||
|
||||
/* 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. */
|
||||
|
@ -936,7 +936,6 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
#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 \
|
||||
|
@ -471,8 +471,6 @@ extern bfd_boolean _bfd_generic_set_section_contents
|
||||
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 \
|
||||
|
@ -476,8 +476,6 @@ extern bfd_boolean _bfd_generic_set_section_contents
|
||||
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 \
|
||||
|
@ -311,7 +311,6 @@ extern int _bfd_ecoff_sizeof_headers (bfd *, struct bfd_link_info *);
|
||||
/* 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
|
||||
|
@ -37,7 +37,6 @@
|
||||
#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 \
|
||||
|
@ -3223,7 +3223,6 @@ mmo_write_object_contents (bfd *abfd)
|
||||
#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 \
|
||||
|
@ -51,7 +51,6 @@
|
||||
#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 \
|
||||
|
@ -1204,7 +1204,6 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
#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 \
|
||||
|
@ -58,7 +58,6 @@
|
||||
#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 \
|
||||
|
@ -92,7 +92,6 @@ dlerror (void)
|
||||
#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
|
||||
|
@ -454,7 +454,6 @@ ppcboot_bfd_print_private_bfd_data (bfd *abfd, void * farg)
|
||||
_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 \
|
||||
|
@ -6732,7 +6732,6 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
|
||||
#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 \
|
||||
|
@ -1258,7 +1258,6 @@ srec_print_symbol (bfd *abfd,
|
||||
#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 \
|
||||
|
@ -446,7 +446,6 @@ BFD_JUMP_TABLE macros.
|
||||
. 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, \
|
||||
@ -473,9 +472,6 @@ BFD_JUMP_TABLE macros.
|
||||
. 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 *);
|
||||
.
|
||||
|
@ -949,7 +949,6 @@ tekhex_print_symbol (bfd *abfd,
|
||||
#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 \
|
||||
|
@ -311,7 +311,6 @@ verilog_mkobject (bfd *abfd)
|
||||
#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
|
||||
|
@ -812,7 +812,6 @@ versados_canonicalize_reloc (bfd *abfd,
|
||||
#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 \
|
||||
|
@ -9239,7 +9239,6 @@ bfd_vms_get_data (bfd *abfd)
|
||||
_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
|
||||
|
@ -50,7 +50,6 @@
|
||||
#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 \
|
||||
|
@ -1,3 +1,10 @@
|
||||
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,
|
||||
|
15
ld/ldlang.c
15
ld/ldlang.c
@ -3072,9 +3072,6 @@ lang_get_output_target (void)
|
||||
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
|
||||
@ -3154,18 +3151,6 @@ open_output (const char *name)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -171,10 +171,6 @@ ld_cleanup (void)
|
||||
#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
|
||||
|
Loading…
x
Reference in New Issue
Block a user