This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ar crashes building libgcc.a
- From: Andrew Cagney <cagney at gnu dot org>
- To: Joern Rennecke <joern dot rennecke at superh dot com>,Aldy Hernandez <aldyh at redhat dot com>
- Cc: binutils at sources dot redhat dot com, cagney at redhat dot com
- Date: Thu, 22 Apr 2004 11:41:11 -0400
- Subject: Re: ar crashes building libgcc.a
- References: <200404221414.i3MEEA918023@linsvr4.uk.superh.com>
Try the attached (I'm still testing it)?
I suspect that the binutils testsuite doesn't contain a test of
>open-file-limit files? Any suggestions on how to add that?
Andrew
2004-04-22 Andrew Cagney <cagney@redhat.com>
* cache.c (bfd_cache_close): Check for a previously closed file.
Index: cache.c
===================================================================
RCS file: /cvs/src/src/bfd/cache.c,v
retrieving revision 1.12
diff -u -r1.12 cache.c
--- cache.c 21 Apr 2004 17:05:11 -0000 1.12
+++ cache.c 22 Apr 2004 15:24:47 -0000
@@ -336,6 +336,10 @@
if (abfd->iovec != &cache_iovec)
return TRUE;
+ if (abfd->iostream == NULL)
+ /* Previously closed. */
+ return TRUE;
+
return bfd_cache_delete (abfd);
}