summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-08-18 02:45:43 +0000
committerAlan Modra <amodra@bigpond.net.au>2004-08-18 02:45:43 +0000
commit05beee52007ee7ee9b0c8b9f1089ca26d7f843b8 (patch)
tree296aff1e9ae9db844569ed7a40f56186eb150833 /bfd
parent38975ec34f47764dc61ba4292c2859b0e7ecb1bb (diff)
downloadbinutils-redhat-05beee52007ee7ee9b0c8b9f1089ca26d7f843b8.tar.gz
PR 338
* elflink.c (bfd_elf_record_link_assignment): Add comment about changing bfd_link_hash_undefined to bfd_link_hash_new. * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol was already on the undefs list.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e4f0e7a303..7c24b394a3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2004-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ PR 338
+ * elflink.c (bfd_elf_record_link_assignment): Add comment about
+ changing bfd_link_hash_undefined to bfd_link_hash_new.
+
2004-08-17 Jakub Jelinek <jakub@redhat.com>
* elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 1e2f335d36..7793e82a3b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -434,7 +434,12 @@ bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Since we're defining the symbol, don't let it seem to have not
been defined. record_dynamic_symbol and size_dynamic_sections
- may depend on this. */
+ may depend on this.
+ ??? Changing bfd_link_hash_undefined to bfd_link_hash_new (or
+ to bfd_link_hash_undefweak, see linker.c:link_action) runs the risk
+ of some later symbol manipulation setting the symbol back to
+ bfd_link_hash_undefined, and the linker trying to add the symbol to
+ the undefs list twice. */
if (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)
h->root.type = bfd_link_hash_new;