public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Philippe De Muyter" <phdm@macqel.be>
To: binutils@sourceware.cygnus.com
Subject: New error message for coff-linker
Date: Mon, 19 Jul 1999 04:00:00 -0000	[thread overview]
Message-ID: <199907191100.NAA23649@mail.macqel.be> (raw)

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];

                 reply	other threads:[~1999-07-19  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199907191100.NAA23649@mail.macqel.be \
    --to=phdm@macqel.be \
    --cc=binutils@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).