This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Indirect and warning symbols
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sat, 3 Dec 2016 21:18:11 +1030
- Subject: Indirect and warning symbols
- Authentication-results: sourceware.org; auth=none
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 --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 ();
--
Alan Modra
Australia Development Lab, IBM