aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-02-14 15:59:13 +1030
committerAlan Modra <amodra@gmail.com>2017-02-14 21:12:07 +1030
commite278ae05839ccffa234e0bfb4286b9f9a9dfbd28 (patch)
treeb46475ee107bca8ae488a38d4611c83922f98991 /bfd/elf64-ppc.c
parent0a0faf9fc652903d6467fc2bc8609891be730bdb (diff)
downloadgdb-e278ae05839ccffa234e0bfb4286b9f9a9dfbd28.zip
gdb-e278ae05839ccffa234e0bfb4286b9f9a9dfbd28.tar.gz
gdb-e278ae05839ccffa234e0bfb4286b9f9a9dfbd28.tar.bz2
Update ppc64_elf_gc_mark_dynamic_ref
* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support --gc-keep-exported, and test versioned field of sym rather than looking for @ in name.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 1c77cc6..ad54384 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6413,11 +6413,12 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf)
&& ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL
&& ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN
&& (!bfd_link_executable (info)
+ || info->gc_keep_exported
|| info->export_dynamic
|| (eh->elf.dynamic
&& d != NULL
&& (*d->match) (&d->head, NULL, eh->elf.root.root.string)))
- && (strchr (eh->elf.root.root.string, ELF_VER_CHR) != NULL
+ && (eh->elf.versioned >= versioned
|| !bfd_hide_sym_by_version (info->version_info,
eh->elf.root.root.string)))))
{