]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
When examining weak symbols follow indirect links.
authorNick Clifton <nickc@redhat.com>
Mon, 11 Nov 2002 15:35:43 +0000 (15:35 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 11 Nov 2002 15:35:43 +0000 (15:35 +0000)
bfd/ChangeLog
bfd/elflink.h

index e05cd12a4154e77e69b83587cff4f2994214d492..160ce2e4d6341bb5ec9b4071a47d30c95eb03000 100644 (file)
@@ -1,3 +1,12 @@
+2002-11-11  Nick Clifton  <nickc@redhat.com>
+       
+       Import this patch from mainline:
+       
+       2002-09-19  Nick Clifton  <nickc@redhat.com>
+       
+       * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
+       follow indirect links.
+
 2002-11-07  Daniel Jacobowitz  <drow@mvista.com>
 
        * configure.in: Clear is_release on the branch after release.
index fd1c563d0086b751c6131b38c5f852786807c207..079917ef75d5288c0c2925cd2c03b2b618eb3b28 100644 (file)
@@ -3900,9 +3900,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);