From 2aa90762b71af7f04032d2bebed6470070d3d801 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 1 Mar 2020 17:07:12 -0800 Subject: plugin: Copy the no_export field to the IR dummy object Copy the no_export field to the IR dummy object when claiming an IR object. PR ld/25618 * plugin.c (plugin_object_p): Copy the no_export field to the IR dummy object. * testsuite/ld-plugin/lto.exp (lto_link_elf_tests): Add PR ld/25618 tests. * testsuite/ld-plugin/pr25618.d: New file. * testsuite/ld-plugin/pr25618a.cc: Likewise. * testsuite/ld-plugin/pr25618a.h: Likewise. * testsuite/ld-plugin/pr25618b.cc: Likewise. * testsuite/ld-plugin/pr25618b.h: Likewise. --- ld/plugin.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ld/plugin.c') diff --git a/ld/plugin.c b/ld/plugin.c index 23a3145..af3f9e2 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -1239,6 +1239,7 @@ plugin_object_p (bfd *ibfd) ibfd->plugin_format = bfd_plugin_yes; ibfd->plugin_dummy_bfd = abfd; bfd_make_readable (abfd); + abfd->no_export = ibfd->no_export; return abfd->xvec; } else -- cgit v1.1