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 c22ee92d45b8b8e41af2565f298e0f68d9be3abb..c2dd86cf7c063590c91d716684859efd0642e717 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 a1c02325d1fd19f5943b7bd57213684afe22bf31..23eafc09884f2c130d2ea66abcb6ba1771cd9a14 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;