diff options
author | Nick Clifton <nickc@redhat.com> | 2002-09-02 14:46:56 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-09-02 14:46:56 +0000 |
commit | 3e369e968e378f3025ec2a98382869b4d70f17fb (patch) | |
tree | dc62ab5b41a691374d3234aeddcebf33e64e05e2 /ld/ldexp.c | |
parent | 5cec694196c356cd13c79df6a278e1773f22cb2d (diff) | |
download | gdb-3e369e968e378f3025ec2a98382869b4d70f17fb.zip gdb-3e369e968e378f3025ec2a98382869b4d70f17fb.tar.gz gdb-3e369e968e378f3025ec2a98382869b4d70f17fb.tar.bz2 |
Fix PROVIDE
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r-- | ld/ldexp.c | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -726,22 +726,20 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) if (tree->type.node_class == etree_assign) create = true; else - create = false; + create = false; h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst, create, false, false); + + if (tree->type.node_class == etree_provide + && (h == NULL + || h->type == bfd_link_hash_undefined + || h->type == bfd_link_hash_common)) + h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst, + true, false, false); + if (h == (struct bfd_link_hash_entry *) NULL) - { - if (tree->type.node_class == etree_assign) - einfo (_("%P%F:%s: hash creation failed\n"), - tree->assign.dst); - } - else if (tree->type.node_class == etree_provide - && h->type != bfd_link_hash_undefined - && h->type != bfd_link_hash_common) - { - /* Do nothing. The symbol was defined by some - object. */ - } + einfo (_("%P%F:%s: hash creation failed\n"), + tree->assign.dst); else { /* FIXME: Should we worry if the symbol is already |