diff options
Diffstat (limited to 'ld/plugin.c')
-rw-r--r-- | ld/plugin.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ld/plugin.c b/ld/plugin.c index 435f466..d880164 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -993,7 +993,14 @@ plugin_notice (struct bfd_link_info *info, /* If this is a ref, set non_ir_ref. */ else if (bfd_is_und_section (section)) - h->non_ir_ref = TRUE; + { + /* Replace the undefined dummy bfd with the real one. */ + if ((h->type == bfd_link_hash_undefined + || h->type == bfd_link_hash_undefweak) + && (h->u.undef.abfd->flags & BFD_PLUGIN) != 0) + h->u.undef.abfd = abfd; + h->non_ir_ref = TRUE; + } /* Otherwise, it must be a new def. Ensure any symbol defined in an IR dummy BFD takes on a new value from a real BFD. |