1 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5 changing bfd_link_hash_undefined to bfd_link_hash_new.
7 2004-08-18 Alan Modra <amodra@bigpond.net.au>
10 * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
11 was already on the undefs list.
13 --- src/bfd/elflink.c 2004/08/17 08:51:07 1.96
14 +++ src/bfd/elflink.c 2004/08/18 02:45:42 1.97
17 /* Since we're defining the symbol, don't let it seem to have not
18 been defined. record_dynamic_symbol and size_dynamic_sections
19 - may depend on this. */
21 + ??? Changing bfd_link_hash_undefined to bfd_link_hash_new (or
22 + to bfd_link_hash_undefweak, see linker.c:link_action) runs the risk
23 + of some later symbol manipulation setting the symbol back to
24 + bfd_link_hash_undefined, and the linker trying to add the symbol to
25 + the undefs list twice. */
26 if (h->root.type == bfd_link_hash_undefweak
27 || h->root.type == bfd_link_hash_undefined)
28 h->root.type = bfd_link_hash_new;
29 --- src/ld/ldexp.c 2004/06/24 04:46:27 1.31
30 +++ src/ld/ldexp.c 2004/08/18 02:45:43 1.32
33 h->type = bfd_link_hash_undefined;
34 h->u.undef.abfd = NULL;
35 - bfd_link_add_undef (link_info.hash, h);
36 + if (h->und_next == NULL)
37 + bfd_link_add_undef (link_info.hash, h);