From 30f34d07c74ca1cc7a2aae4ff58f31d8046cd9a1 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 6 Jun 1994 16:49:09 +0000 Subject: [PATCH] * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy data to a non-ECOFF file. --- bfd/ChangeLog | 3 +++ bfd/ecoff.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 072c500fb8..c5658916ab 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy + data to a non-ECOFF file. + * libbfd-in.h: Add warning that libbfd.h is a generated file. * libbfd.h: Rebuilt. diff --git a/bfd/ecoff.c b/bfd/ecoff.c index 83a3c22d89..64661cdd18 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -2178,7 +2178,11 @@ ecoff_bfd_copy_private_bfd_data (ibfd, obfd) size_t c; boolean local; - BFD_ASSERT (ibfd->xvec == obfd->xvec); + /* This function is selected based on the input vector. We only + want to copy information over if the output BFD also uses ECOFF + format. */ + if (bfd_get_flavour (obfd) != bfd_target_ecoff_flavour) + return true; /* Copy the GP value and the register masks. */ ecoff_data (obfd)->gp = ecoff_data (ibfd)->gp;