* elflink.h (elf_link_read_relocs_from_section): Don't abort with
authorAlan Modra <amodra@gmail.com>
Tue, 25 Feb 2003 04:39:32 +0000 (04:39 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Feb 2003 04:39:32 +0000 (04:39 +0000)
wrong reloc sizes.

bfd/ChangeLog
bfd/elflink.h

index eb0e0006ece13fe88e35050d512bb2dbb220c298..bf733ca76a2207d518ead2ef1581318edcee495b 100644 (file)
@@ -3,6 +3,8 @@
        * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
        and rel_hdr2 when initially counting input relocs rather than after
        creating output reloc sections.
+       (elf_link_read_relocs_from_section): Don't abort with wrong reloc
+       sizes.
 
        * Makefile.am: Run "make dep-am".
        * Makefile.in: Regenerate.
index bcc7d1f7c2c5cd8cae28abf550c7206d3f1258e7..7d2d2e24eae78291edbf4fb1220c209ded216ce1 100644 (file)
@@ -2579,7 +2579,10 @@ elf_link_read_relocs_from_section (abfd, shdr, external_relocs,
   else if (shdr->sh_entsize == sizeof (Elf_External_Rela))
     swap_in = bed->s->swap_reloca_in;
   else
-    abort ();
+    {
+      bfd_set_error (bfd_error_wrong_format);
+      return FALSE;
+    }
 
   erela = external_relocs;
   erelaend = erela + NUM_SHDR_ENTRIES (shdr) * shdr->sh_entsize;