This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Indirect and warning symbols
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 3 Dec 2016 10:55:15 -0000
- Subject: [binutils-gdb] Indirect and warning symbols
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8400d40d954ec3b4a3fe9200645a1b6e90ba46f4
commit 8400d40d954ec3b4a3fe9200645a1b6e90ba46f4
Author: Alan Modra <amodra@gmail.com>
Date: Sat Dec 3 20:57:27 2016 +1030
Indirect and warning symbols
It's possible but unlikely that an indirect symbol points at a warning
symbol.
* elf64-ppc.c (add_symbol_adjust): Correct order of tests for
warning and indirect symbols.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elf64-ppc.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 84ac6c0..7ec26b0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2016-12-03 Alan Modra <amodra@gmail.com>
+ * elf64-ppc.c (add_symbol_adjust): Correct order of tests for
+ warning and indirect symbols.
+
+2016-12-03 Alan Modra <amodra@gmail.com>
+
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy dynamic
flags when direct symbol is versioned_hidden.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index bfdfc09..d7d6adb 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5063,12 +5063,12 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info)
struct ppc_link_hash_table *htab;
struct ppc_link_hash_entry *fdh;
- if (eh->elf.root.type == bfd_link_hash_indirect)
- return TRUE;
-
if (eh->elf.root.type == bfd_link_hash_warning)
eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
+ if (eh->elf.root.type == bfd_link_hash_indirect)
+ return TRUE;
+
if (eh->elf.root.root.string[0] != '.')
abort ();