aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-09-19 16:34:14 +0000
committerNick Clifton <nickc@redhat.com>2002-09-19 16:34:14 +0000
commit8e67855b57b51cbe5f41715f24b34447fa44cafd (patch)
treeaf1272d1875643745f10bd331891d4dc404f156e /bfd/elflink.h
parent021c2b5e4ba370c7818c09d1b85a105939fc6377 (diff)
downloadgdb-8e67855b57b51cbe5f41715f24b34447fa44cafd.zip
gdb-8e67855b57b51cbe5f41715f24b34447fa44cafd.tar.gz
gdb-8e67855b57b51cbe5f41715f24b34447fa44cafd.tar.bz2
When examining weak symbols, follow indirect links.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 638f80a..2df334b 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -3886,9 +3886,12 @@ elf_fix_symbol_flags (h, eif)
{
struct elf_link_hash_entry *weakdef;
+ weakdef = h->weakdef;
+ if (h->root.type == bfd_link_hash_indirect)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak);
- weakdef = h->weakdef;
BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
|| weakdef->root.type == bfd_link_hash_defweak);
BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);