Revert "Check thin archive element file size against archive header"

This reverts commit 48e3e6aec8.

	PR 28929
	* archive.c (_bfd_get_elt_at_filepos): Don't check thin archive
	element file size.
This commit is contained in:
Alan Modra 2022-03-01 21:54:34 +10:30
parent 95e96e052a
commit 581c5ba435

View File

@ -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 ())
{