summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-04-28 10:31:24 +0000
committerNick Clifton <nickc@redhat.com>2005-04-28 10:31:24 +0000
commit618b3199bfb0260c21ff472a996afbaacaf8bdd1 (patch)
tree839ab4d10914f7ff100b6be59b82343e868a0269
parentaec4e58a3491e182566604cd7edb417f1ccd4c80 (diff)
downloadbinutils-redhat-618b3199bfb0260c21ff472a996afbaacaf8bdd1.tar.gz
Applied this patch for Julian Brown <julian@codesourcery.com>
* elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak import.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c22ee92d45..c2dd86cf7c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-28 Julian Brown <julian@codesourcery.com>
+
+ * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
+ import.
+
2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
diff --git a/bfd/elflink.c b/bfd/elflink.c
index a1c02325d1..23eafc0988 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -9808,9 +9808,11 @@ _bfd_elf_provide_symbol (struct bfd_link_info *info, const char *name,
bfd_vma val)
{
struct elf_link_hash_entry *h;
+
h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE,
FALSE);
- if (h != NULL && h->root.type == bfd_link_hash_undefined)
+ if (h != NULL && (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak))
{
h->root.type = bfd_link_hash_defined;
h->root.u.def.section = bfd_abs_section_ptr;