aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/plugin.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 927074e..14a917b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-02 Alan Modra <amodra@gmail.com>
+
+ * plugin.c (plugin_object_p): Return a bfd_cleanup.
+ (plugin_cleanup): New function.
+
2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
PR ld/25618
diff --git a/ld/plugin.c b/ld/plugin.c
index af3f9e2..4ef4a23 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -175,7 +175,7 @@ static bfd_boolean plugin_notice (struct bfd_link_info *,
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)
@@ -1164,7 +1164,12 @@ plugin_strdup (bfd *abfd, const char *str)
return copy;
}
-static const bfd_target *
+static void
+plugin_cleanup (bfd *abfd ATTRIBUTE_UNUSED)
+{
+}
+
+static bfd_cleanup
plugin_object_p (bfd *ibfd)
{
int claimed;
@@ -1179,7 +1184,7 @@ plugin_object_p (bfd *ibfd)
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;
}
@@ -1240,7 +1245,7 @@ plugin_object_p (bfd *ibfd)
ibfd->plugin_dummy_bfd = abfd;
bfd_make_readable (abfd);
abfd->no_export = ibfd->no_export;
- return abfd->xvec;
+ return plugin_cleanup;
}
else
{