https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93980
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> --- This linker patch: iff --git a/ld/plugin.c b/ld/plugin.c index 47c053e5a0a..5960df65243 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -1242,6 +1242,8 @@ plugin_object_p (bfd *ibfd) ibfd->plugin_format = bfd_plugin_yes; ibfd->plugin_dummy_bfd = abfd; bfd_make_readable (abfd); + if (ibfd->my_archive != NULL) + abfd->no_export = ibfd->my_archive->no_export; return abfd->xvec; } else fixes the testcase.