Fix PROVIDE
This commit is contained in:
parent
5cec694196
commit
3e369e968e
2 changed files with 17 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-09-02 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* ldexp.c (exp_fold_tree): If the first attempt to lookup a
|
||||||
|
PROVIDEd symbol fails, look it up again, but this time with
|
||||||
|
the 'create' flag set.
|
||||||
|
|
||||||
2002-08-30 Nick Clifton <nickc@redhat.com>
|
2002-08-30 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
|
* scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
|
||||||
|
|
18
ld/ldexp.c
18
ld/ldexp.c
|
@ -729,19 +729,17 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
|
||||||
create = false;
|
create = false;
|
||||||
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
|
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
|
||||||
create, false, false);
|
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 (h == (struct bfd_link_hash_entry *) NULL)
|
||||||
{
|
|
||||||
if (tree->type.node_class == etree_assign)
|
|
||||||
einfo (_("%P%F:%s: hash creation failed\n"),
|
einfo (_("%P%F:%s: hash creation failed\n"),
|
||||||
tree->assign.dst);
|
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. */
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* FIXME: Should we worry if the symbol is already
|
/* FIXME: Should we worry if the symbol is already
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue