bfd_close (bfd *abfd)
{
bfd_boolean ret;
+ bfd *nbfd;
+ bfd *next;
if (bfd_write_p (abfd))
{
return FALSE;
}
+ /* Close nested archives (if this bfd is a thin archive). */
+ for (nbfd = abfd->nested_archives; nbfd; nbfd = next)
+ {
+ next = nbfd->archive_next;
+ bfd_close (nbfd);
+ }
+
if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
return FALSE;