aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fd34de2..d8ebc0d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3953
+ * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
+ when adding default symbol.
+
2007-02-13 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
diff --git a/bfd/elflink.c b/bfd/elflink.c
index d76faae..00baf5d 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1556,6 +1556,10 @@ _bfd_elf_add_default_symbol (bfd *abfd,
hi = h;
}
+ /* Check if HI is a warning symbol. */
+ if (hi->root.type == bfd_link_hash_warning)
+ hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
+
/* If there is a duplicate definition somewhere, then HI may not
point to an indirect symbol. We will have reported an error to
the user in that case. */