aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index bc960bf..a4a0530 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -9808,7 +9808,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
relocs against symbols which are not dynamic. */
else if (h->type != STT_GNU_IFUNC)
{
- if (h->dynamic_adjusted
+ if ((h->dynamic_adjusted
+ || (h->ref_regular
+ && h->root.type == bfd_link_hash_undefweak
+ && (info->dynamic_undefined_weak > 0
+ || !_bfd_elf_readonly_dynrelocs (h))))
&& !h->def_regular
&& !ELF_COMMON_DEF_P (h))
{