From a5c71af8d3c7c535f27614947f72883233658706 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 13 Nov 2014 17:46:11 +0000 Subject: More fixes for memory access violations whilst scanning corrupt binaries. PR binutils/17512 * config/obj-coff.c (coff_obj_symbol_new_hook): Set the is_sym field. * coffcode.h (coff_ptr_struct): Add is_sym field. (coff_new_section_hook): Set the is_sym field. (coff_pointerize_aux_hook): Check the is_sym field. (coff_print_aux): Likewise. (coff_compute_section_file_positions): Likewise. (coff_write_object_contents): Likewise. (coff_slurp_line_table): Likewise. (coff_slurp_symbol_table): Likewise. (CALC_ADDEND): Likewise. * coffgen.c (coff_renumber_symbols): Likewise. (coff_mangle_symbols): Likewise. (coff_fix_symbol_name): Likewise. (coff_write_symbol): Likewise. (coff_write_alien_symbol): Likewise. (coff_write_native_symbol): Likewise. (coff_write_symbols): Likewise. (coff_write_linenumbers): Likewise. (coff_pointerize_aux): Likewise. (coff_get_normalized_symtab): Likewise. (coff_get_symbol_info): Likewise. (bfd_coff_get_syment): Likewise. (bfd_coff_get_auxent): Likewise. (coff_print_symbol): Likewise. (coff_find_nearest_line_with_names): Likewise. (bfd_coff_set_symbol_class): Likewise. (coff_make_empty_symbol): Set the is_sym field. (coff_bfd_make_debug_symbol): Likewise. * peicode.h (pe_ILF_make_a_symbol): Likewise. * libcoff.h: Regenerate. * libcoff-in.h: Regenerate. --- bfd/peicode.h | 1 + 1 file changed, 1 insertion(+) (limited to 'bfd/peicode.h') diff --git a/bfd/peicode.h b/bfd/peicode.h index c3d13f81bcc..83653535554 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -568,6 +568,7 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars, ent->u.syment.n_sclass = sclass; ent->u.syment.n_scnum = section->target_index; ent->u.syment._n._n_n._n_offset = (bfd_hostptr_t) sym; + ent->is_sym = TRUE; sym->symbol.the_bfd = vars->abfd; sym->symbol.name = vars->string_ptr; -- cgit v1.2.1