This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

New error message for coff-linker


Hello Ian

Could you please put the following patch in the binutils sources.  It
prevents a `core' file and gives an explanatory message for some
bad .o files generated by the sysV68's native `as'.  A similar warning
is already in objdump.

Thanks

Philippe

Fri Jul  9 21:57:39 1999  Philippe De Muyter  <phdm@macqel.be>

	* cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
 	message	and fail if a symbol index is out of range.

--- ./bfd/cofflink.c	Fri Jul  9 21:58:50 1999
+++ ./bfd/cofflink.c	Fri Jul  9 21:22:16 1999
@@ -2586,6 +2586,13 @@ _bfd_coff_reloc_link_order (output_bfd, 
 	  h = NULL;
 	  sym = NULL;
 	}
+      else if (symndx < 0 || symndx >= obj_conv_table_size (input_bfd))
+	{
+	  (*_bfd_error_handler)
+	    ("%s: illegal symbol index %ld in relocs",
+	     bfd_get_filename (input_bfd), symndx);
+	  return false;
+	}
       else
 	{    
 	  h = obj_coff_sym_hashes (input_bfd)[symndx];


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]