This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Update ppc64_elf_gc_mark_dynamic_ref
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 14 Feb 2017 10:42:30 -0000
- Subject: [binutils-gdb] Update ppc64_elf_gc_mark_dynamic_ref
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e278ae05839ccffa234e0bfb4286b9f9a9dfbd28
commit e278ae05839ccffa234e0bfb4286b9f9a9dfbd28
Author: Alan Modra <amodra@gmail.com>
Date: Tue Feb 14 15:59:13 2017 +1030
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.
Diff:
---
bfd/ChangeLog | 6 ++++++
bfd/elf64-ppc.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index db620e2..252c1d5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2017-02-14 Alan Modra <amodra@gmail.com>
+
+ * 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.
+
2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
* elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
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)))))
{