aboutsummaryrefslogtreecommitdiff
path: root/bfd/ecoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/ecoff.c')
-rw-r--r--bfd/ecoff.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 573f52d..f2626c5 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -110,18 +110,20 @@ _bfd_ecoff_mkobject_hook (bfd *abfd, void * filehdr, void * aouthdr)
}
bool
-_bfd_ecoff_close_and_cleanup (bfd *abfd)
+_bfd_ecoff_bfd_free_cached_info (bfd *abfd)
{
- struct ecoff_tdata *tdata = ecoff_data (abfd);
+ struct ecoff_tdata *tdata;
- if (tdata != NULL && bfd_get_format (abfd) == bfd_object)
+ if ((bfd_get_format (abfd) == bfd_object
+ || bfd_get_format (abfd) == bfd_core)
+ && (tdata = ecoff_data (abfd)) != NULL)
while (tdata->mips_refhi_list != NULL)
{
struct mips_hi *ref = tdata->mips_refhi_list;
tdata->mips_refhi_list = ref->next;
free (ref);
}
- return _bfd_generic_close_and_cleanup (abfd);
+ return _bfd_generic_bfd_free_cached_info (abfd);
}
/* Initialize a new section. */