This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 3/5] remove deleted BFDs from the archive cache
On Thu, Aug 9, 2012 at 3:15 AM, Alan Modra <email@example.com> 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
> 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.
> 2012-08-09 Alan Modra <firstname.lastname@example.org>
> Tom Tromey <email@example.com>
> * 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
> * libbfd-in.h (struct areltdata <parent_cache, key>): 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: