diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 18 |
2 files changed, 11 insertions, 12 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9aeda3a..aed570d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2005-02-04 Alan Modra <amodra@bigpond.net.au> + + * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't + look up symbol for etree_provide here. + 2005-02-02 Daniel Jacobowitz <dan@codesourcery.com> * emulparams/elf32bmip.sh (TEXT_DYNAMIC): Always set. diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index fd35938..771a98c 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -931,16 +931,14 @@ cat >>e${EMULATION_NAME}.c <<EOF static void gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp) { - struct bfd_link_hash_entry *h; + bfd_boolean provide = FALSE; switch (exp->type.node_class) { case etree_provide: - h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - FALSE, FALSE, FALSE); - if (h == NULL) - break; - + provide = TRUE; + /* Fall thru */ + case etree_assign: /* We call record_link_assignment even if the symbol is defined. This is because if it is defined by a dynamic object, we actually want to use the value defined by the linker script, @@ -948,14 +946,10 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp) symbols like etext). If the symbol is defined by a regular object, then, as it happens, calling record_link_assignment will do no harm. */ - - /* Fall through. */ - case etree_assign: if (strcmp (exp->assign.dst, ".") != 0) { - if (! (bfd_elf_record_link_assignment - (output_bfd, &link_info, exp->assign.dst, - exp->type.node_class == etree_provide ? TRUE : FALSE))) + if (!bfd_elf_record_link_assignment (output_bfd, &link_info, + exp->assign.dst, provide)) einfo ("%P%F: failed to record assignment to %s: %E\n", exp->assign.dst); } |