* 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

@ -1,3 +1,7 @@
2002-05-04 Bob Byrnes <byrnes@curl.com>
* size.c (display_archive): Add last_arfile and code to close archives.
2002-05-01 Alan Modra <amodra@bigpond.net.au>
* nm.c (print_symbol): Check returned filename from

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