aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ee5c01f..982bf4f 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1234,6 +1234,16 @@ _bfd_elf_merge_symbol (bfd *abfd,
olddyn = (oldsec->symbol->flags & BSF_DYNAMIC) != 0;
}
+ /* Handle a case where plugin_notice won't be called and thus won't
+ set the non_ir_ref flags on the first pass over symbols. */
+ if (oldbfd != NULL
+ && (oldbfd->flags & BFD_PLUGIN) != (abfd->flags & BFD_PLUGIN)
+ && newdyn != olddyn)
+ {
+ h->root.non_ir_ref_dynamic = TRUE;
+ hi->root.non_ir_ref_dynamic = TRUE;
+ }
+
/* NEWDEF and OLDDEF indicate whether the new or old symbol,
respectively, appear to be a definition rather than reference. */