summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-03-03 21:31:10 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-03-03 21:31:10 +0000
commitf4ffa02b8075277f2725bb009f93312626b91def (patch)
treebefb100435a64e9433c36b96fa011d40ab7cfa0f
parent9d0406b0e867731a74d09817d675e98de55c4678 (diff)
downloadgdb-f4ffa02b8075277f2725bb009f93312626b91def.tar.gz
* elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
undefined symbols as hash_new.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 83c4f4135d6..e0da01f36cb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-03 Alexandre Oliva <aoliva@redhat.com>
+
+ * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
+ undefined symbols as hash_new.
+
2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
* archures.c: Add bfd_mach_sh4_nommu_nofpu.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b992c39cb18..50513648db6 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -430,6 +430,13 @@ bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
if (h == NULL)
return FALSE;
+ /* 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. */
+ if (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined)
+ h->root.type = bfd_link_hash_new;
+
if (h->root.type == bfd_link_hash_new)
h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;