summaryrefslogtreecommitdiff
path: root/bfd
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
commite0bb816ad1be3f2d6f323a7350d08951aa83f953 (patch)
treedcb0c3e8faa7c6e082d7360c866e4e76efa449fb /bfd
parent3a91f3dce20816939d50ef5eeaf21fc3fc107cef (diff)
downloadgdb-e0bb816ad1be3f2d6f323a7350d08951aa83f953.tar.gz
When examining weak symbols, follow indirect links.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 233e519d59b..cb06a25bc26 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-19 Nick Clifton <nickc@redhat.com>
+
+ * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
+ follow indirect links.
+
2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
* ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 638f80af266..2df334b1e48 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);