Applied this patch for Julian Brown <julian@codesourcery.com>
authorNick Clifton <nickc@redhat.com>
Thu, 28 Apr 2005 10:31:24 +0000 (10:31 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 28 Apr 2005 10:31:24 +0000 (10:31 +0000)
* elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak import.

bfd/ChangeLog
bfd/elflink.c

index c22ee92..c2dd86c 100644 (file)
@@ -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 *".
index a1c0232..23eafc0 100644 (file)
@@ -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;