This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Tidy ppc64_elf_hide_symbol
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 3 Dec 2016 10:55:27 -0000
- Subject: [binutils-gdb] Tidy ppc64_elf_hide_symbol
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b8ac28419be22fe0cc72f6eaaba1ab029610fc71
commit b8ac28419be22fe0cc72f6eaaba1ab029610fc71
Author: Alan Modra <amodra@gmail.com>
Date: Sat Dec 3 20:58:15 2016 +1030
Tidy ppc64_elf_hide_symbol
* elf64-ppc.c (ppc64_elf_hide_symbol): Access hash table as
elf_link_hash_table rather than ppc_link_hash_table.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elf64-ppc.c | 10 +++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 733735c..7721b17 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2016-12-03 Alan Modra <amodra@gmail.com>
+ * elf64-ppc.c (ppc64_elf_hide_symbol): Access hash table as
+ elf_link_hash_table rather than ppc_link_hash_table.
+
+2016-12-03 Alan Modra <amodra@gmail.com>
+
* elf64-ppc.c (add_symbol_adjust): Delete dead code.
2016-12-03 Alan Modra <amodra@gmail.com>
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 1256ead..27328ec 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -7392,7 +7392,7 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
if (fh == NULL)
{
const char *p, *q;
- struct ppc_link_hash_table *htab;
+ struct elf_link_hash_table *htab = elf_hash_table (info);
char save;
/* We aren't supposed to use alloca in BFD because on
@@ -7407,12 +7407,8 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
p = eh->elf.root.root.string - 1;
save = *p;
*(char *) p = '.';
- htab = ppc_hash_table (info);
- if (htab == NULL)
- return;
-
fh = (struct ppc_link_hash_entry *)
- elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+ elf_link_hash_lookup (htab, p, FALSE, FALSE, FALSE);
*(char *) p = save;
/* Unfortunately, if it so happens that the string we were
@@ -7426,7 +7422,7 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
--q, --p;
if (q < eh->elf.root.root.string && *p == '.')
fh = (struct ppc_link_hash_entry *)
- elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+ elf_link_hash_lookup (htab, p, FALSE, FALSE, FALSE);
}
if (fh != NULL)
{