aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-05-04 01:31:50 +0000
committerAlan Modra <amodra@gmail.com>2002-05-04 01:31:50 +0000
commit6b52b824688a08534d1ae924ea89d722df2ae079 (patch)
tree4617c515096303d69132e9c0da5672c9d714e036 /binutils
parent301e31397f55349bbe90e4948c60f8361cb9ec44 (diff)
downloadgdb-6b52b824688a08534d1ae924ea89d722df2ae079.zip
gdb-6b52b824688a08534d1ae924ea89d722df2ae079.tar.gz
gdb-6b52b824688a08534d1ae924ea89d722df2ae079.tar.bz2
* size.c (display_archive): Add last_arfile and code to close archives.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/size.c9
2 files changed, 12 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index d303d49..dd92220 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/size.c b/binutils/size.c
index 3da7520..961593b 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -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