diff options
author | Alan Modra <amodra@bigpond.net.au> | 2012-11-06 09:31:10 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2012-11-06 09:31:10 +0000 |
commit | 4e70690a4d87f4fe096d17c9e012cd621ed401a5 (patch) | |
tree | b0e60ecc84fe9627858342997645278e5d7ff4c0 | |
parent | 1cc68fa2628bdb1a3ca92fc34afd0a372a420dd3 (diff) | |
download | binutils-redhat-4e70690a4d87f4fe096d17c9e012cd621ed401a5.tar.gz |
PR binutils/14567
* opncls.c (opncls_iovec): Forward declare.
(_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream
to new bfd.
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/opncls.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cea4177ecd..02a6eab18e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ 2012-11-06 Alan Modra <amodra@gmail.com> + 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 <amodra@gmail.com> + * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call _bfd_generic_close_and_cleanup for mach_o_fat archives. diff --git a/bfd/opncls.c b/bfd/opncls.c index fdccba371e..8fd9ac86a9 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; |