aboutsummaryrefslogtreecommitdiff
path: root/bfd/libcoff.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-11-13 17:46:11 +0000
committerNick Clifton <nickc@redhat.com>2014-11-13 17:46:11 +0000
commita5c71af8d3c7c535f27614947f72883233658706 (patch)
treeefbc4ad3fc157bae2596150b4142c8f015a2967f /bfd/libcoff.h
parent09bc6c722493047fb50e8a7e70e028023eff8f32 (diff)
downloadgdb-a5c71af8d3c7c535f27614947f72883233658706.zip
gdb-a5c71af8d3c7c535f27614947f72883233658706.tar.gz
gdb-a5c71af8d3c7c535f27614947f72883233658706.tar.bz2
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.
Diffstat (limited to 'bfd/libcoff.h')
-rw-r--r--bfd/libcoff.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 7ed52de..9479985 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -630,7 +630,7 @@ extern bfd_boolean ppc_process_before_allocation
typedef struct coff_ptr_struct
{
/* Remembers the offset from the first symbol in the file for
- this symbol. Generated by coff_renumber_symbols. */
+ this symbol. Generated by coff_renumber_symbols. */
unsigned int offset;
/* Should the value of this symbol be renumbered. Used for
@@ -638,15 +638,15 @@ typedef struct coff_ptr_struct
unsigned int fix_value : 1;
/* Should the tag field of this symbol be renumbered.
- Created by coff_pointerize_aux. */
+ Created by coff_pointerize_aux. */
unsigned int fix_tag : 1;
/* Should the endidx field of this symbol be renumbered.
- Created by coff_pointerize_aux. */
+ Created by coff_pointerize_aux. */
unsigned int fix_end : 1;
/* Should the x_csect.x_scnlen field be renumbered.
- Created by coff_pointerize_aux. */
+ Created by coff_pointerize_aux. */
unsigned int fix_scnlen : 1;
/* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
@@ -654,12 +654,15 @@ typedef struct coff_ptr_struct
unsigned int fix_line : 1;
/* The container for the symbol structure as read and translated
- from the file. */
+ from the file. */
union
{
union internal_auxent auxent;
struct internal_syment syment;
} u;
+
+ /* Selector for the union above. */
+ bfd_boolean is_sym;
} combined_entry_type;