diff options
author | Alan Modra <amodra@gmail.com> | 2014-08-29 10:37:52 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-08-29 10:37:52 +0930 |
commit | b138affb0262cc600485a93d4fa8cfc7491dbde9 (patch) | |
tree | 0c15a77803d76b9f2e04f524823e51b0f07375ce /bfd | |
parent | bd25671c6f202c4a5108883caa2adb24ff6f361f (diff) | |
download | fsf-binutils-gdb-b138affb0262cc600485a93d4fa8cfc7491dbde9.zip fsf-binutils-gdb-b138affb0262cc600485a93d4fa8cfc7491dbde9.tar.gz fsf-binutils-gdb-b138affb0262cc600485a93d4fa8cfc7491dbde9.tar.bz2 |
Prevent alpha_vms_object_p stopping bfd_check_format_matches scan
Any error other than bfd_error_wrong_format returned from object_p()
is effectively a fatal error.
* vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
error. Remove redundant bfd_set_error.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/vms-alpha.c | 11 |
2 files changed, 7 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3e005c9..3c914be 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2014-08-29 Alan Modra <amodra@gmail.com> + * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated + error. Remove redundant bfd_set_error. + +2014-08-29 Alan Modra <amodra@gmail.com> + * srec.c (srec_scan): Revert last change. Report an error for S-records with less than the miniumum byte count. diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index f62d324..b7b8526 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -2474,10 +2474,7 @@ alpha_vms_object_p (bfd *abfd) PRIV (recrd.rec) = buf; if (bfd_bread (buf, test_len, abfd) != test_len) - { - bfd_set_error (bfd_error_file_truncated); - goto error_ret; - } + goto err_wrong_format; /* Is it an image? */ if ((bfd_getl32 (buf) == EIHD__K_MAJORID) @@ -2502,7 +2499,6 @@ alpha_vms_object_p (bfd *abfd) if (buf == NULL) { PRIV (recrd.buf) = NULL; - bfd_set_error (bfd_error_no_memory); goto error_ret; } PRIV (recrd.buf) = buf; @@ -2517,10 +2513,7 @@ alpha_vms_object_p (bfd *abfd) while (remaining > 0) { if (bfd_bread (buf + read_so_far, to_read, abfd) != to_read) - { - bfd_set_error (bfd_error_file_truncated); - goto err_wrong_format; - } + goto err_wrong_format; read_so_far += to_read; remaining -= to_read; |