aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/format.c8
2 files changed, 6 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4fc1345..97c9309 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2020-01-06 Alan Modra <amodra@gmail.com>
+ * format.c (bfd_check_format_matches): Ignore bfd_error on target
+ match failures. Don't init to bfd_error_wrong_format before
+ calling _bfd_check_format.
+
+2020-01-06 Alan Modra <amodra@gmail.com>
+
* vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
status rather than exiting on stack overflow or underflow.
(_bfd_vms_slurp_etir): Adjust to suit.
diff --git a/bfd/format.c b/bfd/format.c
index e53955e..a80a175 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -325,12 +325,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
goto err_ret;
- /* If _bfd_check_format neglects to set bfd_error, assume
- bfd_error_wrong_format. We didn't used to even pay any
- attention to bfd_error, so I suspect that some
- _bfd_check_format might have this problem. */
- bfd_set_error (bfd_error_wrong_format);
-
temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
if (temp)
{
@@ -389,8 +383,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
goto err_ret;
}
}
- else if (bfd_get_error () != bfd_error_wrong_format)
- goto err_ret;
}
if (best_count == 1)