aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf64-ppc.c1
-rw-r--r--bfd/elflink.c11
-rw-r--r--bfd/linker.c3
4 files changed, 18 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 52c192d..8b3f1a5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2017-05-16 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
+ * elflink.c (elf_link_add_object_symbols): Update to use
+ non_ir_ref_dynamic.
+ (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
+ non_ir_ref.
+ * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
+
2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
* elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index a20d9b3..a2cc373 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5119,6 +5119,7 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info)
/* Propagate reference flags from entry symbol to function
descriptor symbol. */
fdh->elf.root.non_ir_ref |= eh->elf.root.non_ir_ref;
+ fdh->elf.root.non_ir_ref_dynamic |= eh->elf.root.non_ir_ref_dynamic;
fdh->elf.ref_regular |= eh->elf.ref_regular;
fdh->elf.ref_regular_nonweak |= eh->elf.ref_regular_nonweak;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ba50b68..8eaf533 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4939,7 +4939,7 @@ error_free_dyn:
struct elf_link_hash_entry *h;
bfd_size_type size;
unsigned int alignment_power;
- unsigned int dynamic_ref_after_ir_def;
+ unsigned int non_ir_ref_dynamic;
for (p = htab->root.table.table[i]; p != NULL; p = p->next)
{
@@ -4961,10 +4961,10 @@ error_free_dyn:
size = 0;
alignment_power = 0;
}
- /* Preserve dynamic_ref_after_ir_def so that this symbol
+ /* Preserve non_ir_ref_dynamic so that this symbol
will be exported when the dynamic lib becomes needed
in the second pass. */
- dynamic_ref_after_ir_def = h->root.dynamic_ref_after_ir_def;
+ non_ir_ref_dynamic = h->root.non_ir_ref_dynamic;
memcpy (p, old_ent, htab->root.table.entsize);
old_ent = (char *) old_ent + htab->root.table.entsize;
h = (struct elf_link_hash_entry *) p;
@@ -4981,7 +4981,7 @@ error_free_dyn:
if (alignment_power > h->root.u.c.p->alignment_power)
h->root.u.c.p->alignment_power = alignment_power;
}
- h->root.dynamic_ref_after_ir_def = dynamic_ref_after_ir_def;
+ h->root.non_ir_ref_dynamic = non_ir_ref_dynamic;
}
}
@@ -10472,7 +10472,8 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
linker may attach linker created dynamic sections
to the plugin bfd. Symbols defined in linker
created sections are not plugin symbols. */
- if (h->root.non_ir_ref
+ if ((h->root.non_ir_ref
+ || h->root.non_ir_ref_dynamic)
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->flags
diff --git a/bfd/linker.c b/bfd/linker.c
index 2f56b46..1f493a3 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1735,7 +1735,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
otherwise add a warning. */
if ((!info->lto_plugin_active
&& (h->u.undef.next != NULL || info->hash->undefs_tail == h))
- || h->non_ir_ref)
+ || h->non_ir_ref
+ || h->non_ir_ref_dynamic)
{
(*info->callbacks->warning) (info, string, h->root.string,
hash_entry_bfd (h), NULL, 0);