From: Alan Modra Date: Tue, 1 Mar 2022 11:24:34 +0000 (+1030) Subject: Revert "Check thin archive element file size against archive header" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=581c5ba435538c23fe63d6884ff885b7ef333568;p=binutils-gdb.git Revert "Check thin archive element file size against archive header" This reverts commit 48e3e6aec8a4f37d00ea6c0da3ab45e76490e3db. PR 28929 * archive.c (_bfd_get_elt_at_filepos): Don't check thin archive element file size. --- diff --git a/bfd/archive.c b/bfd/archive.c index ffaec7e2231..9ad61adc615 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -717,17 +717,7 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos, open the external file as a bfd. */ bfd_set_error (bfd_error_no_error); n_bfd = open_nested_file (filename, archive); - if (n_bfd != NULL) - { - ufile_ptr size = bfd_get_size (n_bfd); - if (size != 0 && size != new_areldata->parsed_size) - { - bfd_set_error (bfd_error_malformed_archive); - bfd_close (n_bfd); - n_bfd = NULL; - } - } - else + if (n_bfd == NULL) { switch (bfd_get_error ()) {