From: Alan Modra Date: Sat, 11 Mar 2000 23:09:42 +0000 (+0000) Subject: Return bfd_error_wrong_format on a format mismatch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=911c6daef6aa101c4fd240e342074c2efcf1d5a7;p=binutils-gdb.git Return bfd_error_wrong_format on a format mismatch. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 773cf69b02f..a2422481092 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2000-03-11 Alan Modra + + * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on + a format mismatch rather than an "error" from bfd_read such as + bfd_error_file_truncated. + 2000-03-10 Geoff Keating * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper diff --git a/bfd/ieee.c b/bfd/ieee.c index 989d7243cba..82b3bac8367 100644 --- a/bfd/ieee.c +++ b/bfd/ieee.c @@ -1336,7 +1336,7 @@ ieee_archive_p (abfd) if (this_byte (&(ieee->h)) != Module_Beginning) { abfd->tdata.ieee_ar_data = save; - goto error_return; + goto got_wrong_format_error; } next_byte (&(ieee->h)); @@ -1345,7 +1345,7 @@ ieee_archive_p (abfd) { bfd_release (abfd, ieee); abfd->tdata.ieee_ar_data = save; - goto error_return; + goto got_wrong_format_error; } /* Throw away the filename */ read_id (&(ieee->h)); @@ -1448,6 +1448,8 @@ ieee_archive_p (abfd) return abfd->xvec; + got_wrong_format_error: + bfd_set_error (bfd_error_wrong_format); error_return: if (elts != NULL) free (elts);