* elflink.h (elf_link_read_relocs_from_section): Don't abort with

wrong reloc sizes.
This commit is contained in:
Alan Modra 2003-02-25 04:39:32 +00:00
parent 3f9a32bd0b
commit 4fabe71ea9
2 changed files with 6 additions and 1 deletions

View 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.

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