Applied this patch for Julian Brown <julian@codesourcery.com>

* elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak import.
This commit is contained in:
Nick Clifton 2005-04-28 10:31:24 +00:00
parent 0002be373a
commit 0291d2913e
2 changed files with 8 additions and 1 deletions

View 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 *".

View 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;