* size.c (display_archive): Add last_arfile and code to close archives.

This commit is contained in:
Alan Modra
2002-05-04 01:31:50 +00:00
parent 301e31397f
commit 6b52b82468
2 changed files with 12 additions and 1 deletions

View File

@@ -316,6 +316,7 @@ display_archive (file)
bfd *file;
{
bfd *arfile = (bfd *) NULL;
bfd *last_arfile = (bfd *) NULL;
for (;;)
{
@@ -333,8 +334,14 @@ display_archive (file)
}
display_bfd (arfile);
/* Don't close the archive elements; we need them for next_archive. */
if (last_arfile != NULL)
bfd_close (last_arfile);
last_arfile = arfile;
}
if (last_arfile != NULL)
bfd_close (last_arfile);
}
static void