diff options
author | Alan Modra <amodra@gmail.com> | 2005-02-03 14:12:54 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-02-03 14:12:54 +0000 |
commit | 4ea42fb74f7eeda2968163eaa74a10139c4a04b2 (patch) | |
tree | 7b617c4fbeea4bf94c73070375faf7baae7aa25b /ld | |
parent | 10d86c8a5c3965bfcc895c7e6a624cd3fd6e240d (diff) | |
download | gdb-4ea42fb74f7eeda2968163eaa74a10139c4a04b2.zip gdb-4ea42fb74f7eeda2968163eaa74a10139c4a04b2.tar.gz gdb-4ea42fb74f7eeda2968163eaa74a10139c4a04b2.tar.bz2 |
bfd/
* elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
lookup here. Set to new before calling bfd_link_repair_undef_list.
(elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
ld/
emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't
look up symbol for etree_provide here.
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); } |