summaryrefslogtreecommitdiff
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 5963e97fdd7..1030e69b7dd 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2545,7 +2545,7 @@ struct plt_entry
copying dynamic variables from a shared lib into an app's dynbss
section, and instead use a dynamic relocation to point into the
shared lib. */
-#define ELIMINATE_COPY_RELOCS 0
+#define ELIMINATE_COPY_RELOCS 1
/* Section name for stubs is the associated section name plus this
string. */
@@ -4518,6 +4518,10 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
|| h->weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
+ if (ELIMINATE_COPY_RELOCS)
+ h->elf_link_hash_flags
+ = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
+ | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
return TRUE;
}