When examining weak symbols, follow indirect links.
authorNick Clifton <nickc@redhat.com>
Thu, 19 Sep 2002 16:34:14 +0000 (16:34 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 19 Sep 2002 16:34:14 +0000 (16:34 +0000)
bfd/ChangeLog
bfd/elflink.h

index 233e519d59b82f78936f7ba39c0957eb147ca269..cb06a25bc26520b5bbbe38f483bbc3285cbe6245 100644 (file)
@@ -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
index 638f80af266ef32aa374fbd5d450a52a70f703f3..2df334b1e48fd216d6497ec548f3cc5def88470e 100644 (file)
@@ -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);