Return bfd_error_wrong_format on a format mismatch.
This commit is contained in:
parent
7893e6a2a7
commit
911c6daef6
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2000-03-11 Alan Modra <alan@spri.levels.unisa.edu.au>
|
||||||
|
|
||||||
|
* 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 <geoffk@cygnus.com>
|
2000-03-10 Geoff Keating <geoffk@cygnus.com>
|
||||||
|
|
||||||
* elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
|
* elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
|
||||||
|
|
|
@ -1336,7 +1336,7 @@ ieee_archive_p (abfd)
|
||||||
if (this_byte (&(ieee->h)) != Module_Beginning)
|
if (this_byte (&(ieee->h)) != Module_Beginning)
|
||||||
{
|
{
|
||||||
abfd->tdata.ieee_ar_data = save;
|
abfd->tdata.ieee_ar_data = save;
|
||||||
goto error_return;
|
goto got_wrong_format_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
next_byte (&(ieee->h));
|
next_byte (&(ieee->h));
|
||||||
|
@ -1345,7 +1345,7 @@ ieee_archive_p (abfd)
|
||||||
{
|
{
|
||||||
bfd_release (abfd, ieee);
|
bfd_release (abfd, ieee);
|
||||||
abfd->tdata.ieee_ar_data = save;
|
abfd->tdata.ieee_ar_data = save;
|
||||||
goto error_return;
|
goto got_wrong_format_error;
|
||||||
}
|
}
|
||||||
/* Throw away the filename */
|
/* Throw away the filename */
|
||||||
read_id (&(ieee->h));
|
read_id (&(ieee->h));
|
||||||
|
@ -1448,6 +1448,8 @@ ieee_archive_p (abfd)
|
||||||
|
|
||||||
return abfd->xvec;
|
return abfd->xvec;
|
||||||
|
|
||||||
|
got_wrong_format_error:
|
||||||
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
error_return:
|
error_return:
|
||||||
if (elts != NULL)
|
if (elts != NULL)
|
||||||
free (elts);
|
free (elts);
|
||||||
|
|
Loading…
Add table
Reference in a new issue