/* Plugin control for the GNU linker.
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 Free Software Foundation, Inc.
This file is part of the GNU Binutils.
struct bfd_link_hash_entry *,
bfd *, asection *, bfd_vma, flagword);
-static const bfd_target * plugin_object_p (bfd *);
+static bfd_cleanup plugin_object_p (bfd *);
#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
return abfd;
}
}
-report_error:
+ report_error:
einfo (_("%F%P: could not create dummy IR bfd: %E\n"));
return NULL;
}
return copy;
}
-static const bfd_target *
+static void
+plugin_cleanup (bfd *abfd ATTRIBUTE_UNUSED)
+{
+}
+
+static bfd_cleanup
plugin_object_p (bfd *ibfd)
{
int claimed;
if (ibfd->plugin_format != bfd_plugin_unknown)
{
if (ibfd->plugin_format == bfd_plugin_yes)
- return ibfd->plugin_dummy_bfd->xvec;
+ return plugin_cleanup;
else
return NULL;
}
ibfd->plugin_format = bfd_plugin_yes;
ibfd->plugin_dummy_bfd = abfd;
bfd_make_readable (abfd);
- return abfd->xvec;
+ abfd->no_export = ibfd->no_export;
+ return plugin_cleanup;
}
else
{