mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
bfd: Pass true to ld_plugin_object_p
Since linker calls bfd_plugin_object_p, which calls ld_plugin_object_p,
only for command-line input objects, pass true to ld_plugin_object_p so
that the same input IR file won't be included twice if the new LTO hook,
LDPT_REGISTER_CLAIM_FILE_HOOK_V2 isn't used.
PR ld/32153
* plugin.c (bfd_plugin_object_p): Pass true to ld_plugin_object_p.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit c839a44c39
)
This commit is contained in:
parent
679f197bc8
commit
f307db3d8b
@ -596,8 +596,12 @@ load_plugin (bfd *abfd)
|
||||
static bfd_cleanup
|
||||
bfd_plugin_object_p (bfd *abfd)
|
||||
{
|
||||
/* Since ld_plugin_object_p is called only for linker command-line input
|
||||
objects, pass true to ld_plugin_object_p so that the same input IR
|
||||
file won't be included twice if the LDPT_REGISTER_CLAIM_FILE_HOOK_V2
|
||||
isn't used. */
|
||||
if (ld_plugin_object_p)
|
||||
return ld_plugin_object_p (abfd, false);
|
||||
return ld_plugin_object_p (abfd, true);
|
||||
|
||||
if (abfd->plugin_format == bfd_plugin_unknown && !load_plugin (abfd))
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user