From b374d0f8d9c2472b083fbb4241a6877d2b1f23d1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Nov 2012 09:31:12 +0000 Subject: [PATCH] PR binutils/14567 * opncls.c (opncls_iovec): Forward declare. (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream to new bfd. --- bfd/ChangeLog | 7 +++++++ bfd/opncls.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cea4177ecd5..02a6eab18e2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2012-11-06 Alan Modra + + PR binutils/14567 + * opncls.c (opncls_iovec): Forward declare. + (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream + to new bfd. + 2012-11-06 Alan Modra * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call diff --git a/bfd/opncls.c b/bfd/opncls.c index fdccba371ec..8fd9ac86a97 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -107,6 +107,8 @@ _bfd_new_bfd (void) return nbfd; } +static const struct bfd_iovec opncls_iovec; + /* Allocate a new BFD as a member of archive OBFD. */ bfd * @@ -119,6 +121,8 @@ _bfd_new_bfd_contained_in (bfd *obfd) return NULL; nbfd->xvec = obfd->xvec; nbfd->iovec = obfd->iovec; + if (obfd->iovec == &opncls_iovec) + nbfd->iostream = obfd->iostream; nbfd->my_archive = obfd; nbfd->direction = read_direction; nbfd->target_defaulted = obfd->target_defaulted; -- 2.30.2