xcoff dependency list for static libraries

This patch fixes fails adding library dependencies for xcoff, and
improves the error message should stat fail for an archive member.
"tmpdir/artest.a: File not found" is plainly wrong.

Fixes these fails:
powerpc-aix5.1  +FAIL: ar adding library dependencies
powerpc-aix5.2  +FAIL: ar adding library dependencies
rs6000-aix4.3.3  +FAIL: ar adding library dependencies
rs6000-aix5.1  +FAIL: ar adding library dependencies
rs6000-aix5.2  +FAIL: ar adding library dependencies

	* archive.c (bfd_ar_hdr_from_filesystem): Use bfd_set_input_error
	when stat of archive member fails.
	* coff-rs6000.c (xcoff_write_archive_contents_old),
	(xcoff_write_archive_contents_big): Likewise, and handle in-memory
	bfd.
This commit is contained in:
Alan Modra 2020-11-09 13:04:04 +10:30
parent c9af384513
commit 904790e24f
3 changed files with 37 additions and 8 deletions

View file

@ -1875,7 +1875,7 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member)
}
else if (stat (filename, &status) != 0)
{
bfd_set_error (bfd_error_system_call);
bfd_set_input_error (member, bfd_error_system_call);
return NULL;
}