From: Nick Clifton Date: Mon, 11 Nov 2002 15:35:43 +0000 (+0000) Subject: When examining weak symbols follow indirect links. X-Git-Tag: binutils-2_13_2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d009e80475f372ac497b3078e0e1f4584f7c27ca;p=thirdparty%2Fbinutils-gdb.git When examining weak symbols follow indirect links. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e05cd12a415..160ce2e4d63 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2002-11-11 Nick Clifton + + Import this patch from mainline: + + 2002-09-19 Nick Clifton + + * elflink.h (elf_fix_symbol_flags): When examining weak symbols, + follow indirect links. + 2002-11-07 Daniel Jacobowitz * configure.in: Clear is_release on the branch after release. diff --git a/bfd/elflink.h b/bfd/elflink.h index fd1c563d008..079917ef75d 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -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);