aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-12-03 20:55:25 +1030
committerAlan Modra <amodra@gmail.com>2016-12-03 20:55:25 +1030
commit474436e67c72d2426e79e600d725812514db0dbe (patch)
treedb48b2afaace4e50188a4ac218fe376eaa140662 /bfd/elf64-ppc.c
parent4193bc588b4e66da0ed502eaef6e7ce85272fb42 (diff)
downloadgdb-474436e67c72d2426e79e600d725812514db0dbe.zip
gdb-474436e67c72d2426e79e600d725812514db0dbe.tar.gz
gdb-474436e67c72d2426e79e600d725812514db0dbe.tar.bz2
ppc64_elf_copy_indirect_symbol versioned_hidden fix
As per _bfd_elf_link_hash_copy_indirect. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy dynamic flags when direct symbol is versioned_hidden.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 5a4bc72..bfdfc09 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -4740,19 +4740,22 @@ ppc64_elf_copy_indirect_symbol (struct bfd_link_info *info,
if (eind->oh != NULL)
edir->oh = ppc_follow_link (eind->oh);
- /* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy NON_GOT_REF.
- We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- if (!(ELIMINATE_COPY_RELOCS
- && eind->elf.root.type != bfd_link_hash_indirect
- && edir->elf.dynamic_adjusted))
- edir->elf.non_got_ref |= eind->elf.non_got_ref;
-
- edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
- edir->elf.ref_regular |= eind->elf.ref_regular;
- edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
- edir->elf.needs_plt |= eind->elf.needs_plt;
- edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
+ if (edir->elf.versioned != versioned_hidden)
+ {
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy NON_GOT_REF.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ if (!(ELIMINATE_COPY_RELOCS
+ && eind->elf.root.type != bfd_link_hash_indirect
+ && edir->elf.dynamic_adjusted))
+ edir->elf.non_got_ref |= eind->elf.non_got_ref;
+
+ edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
+ edir->elf.ref_regular |= eind->elf.ref_regular;
+ edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
+ edir->elf.needs_plt |= eind->elf.needs_plt;
+ edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
+ }
/* If we were called to copy over info for a weak sym, don't copy
dyn_relocs, plt/got info, or dynindx. We used to copy dyn_relocs