From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30449 invoked by alias); 15 Aug 2012 19:42:09 -0000 Received: (qmail 30426 invoked by uid 22791); 15 Aug 2012 19:42:08 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_FD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Aug 2012 19:41:54 +0000 Received: by vbkv13 with SMTP id v13so2069276vbk.0 for ; Wed, 15 Aug 2012 12:41:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.12.231 with SMTP id b7mr15137738vec.28.1345059713703; Wed, 15 Aug 2012 12:41:53 -0700 (PDT) Received: by 10.58.234.39 with HTTP; Wed, 15 Aug 2012 12:41:53 -0700 (PDT) In-Reply-To: <20120809101540.GA30412@bubble.grove.modra.org> References: <87txwknhzj.fsf@fleche.redhat.com> <20120803160934.GE4430@bubble.grove.modra.org> <87hasdgv0h.fsf@fleche.redhat.com> <20120809101540.GA30412@bubble.grove.modra.org> Date: Wed, 15 Aug 2012 20:14:00 -0000 Message-ID: Subject: Re: [PATCH 3/5] remove deleted BFDs from the archive cache From: "H.J. Lu" To: Tom Tromey , Binutils Development Cc: Alan Modra Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00279.txt.bz2 On Thu, Aug 9, 2012 at 3:15 AM, Alan Modra wrote: > On Wed, Aug 08, 2012 at 11:21:02AM -0600, Tom Tromey wrote: >> Alan, in a private note you mentioned using bfd_read_p in the check in >> _bfd_archive_close_and_cleanup. > > I'm reasonably sure that the code as it was doesn't mess with archive > bfds opened for writing, but wanted to make it obvious. I've also > moved the code setting new areltdata fields (and renamed them) to > _bfd_add_bfd_to_archive_cache to make the code a bit tidier. > Committed. > > 2012-08-09 Alan Modra > Tom Tromey > > * archive.c (SECTION Archives): Update documentation. > (_bfd_delete_archive_data): Remove. > (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'. > (archive_close_worker, _bfd_archive_close_and_cleanup): New > functions. > * libbfd-in.h (struct areltdata ): New fields. > (_bfd_delete_archive_data): Don't declare. > (_bfd_archive_close_and_cleanup): Declare. > (_bfd_generic_close_and_cleanup): Redefine. > * libbfd.h: Rebuild. > * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data. > (bfd_close): Don't close nested thin archives here. > > It breaks strip: http://sourceware.org/bugzilla/show_bug.cgi?id=14475 -- H.J.