From 0291d2913e5079196f586d80a3424c835aec736e Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 28 Apr 2005 10:31:24 +0000 Subject: [PATCH] Applied this patch for Julian Brown * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak import. --- bfd/ChangeLog | 5 +++++ bfd/elflink.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c22ee92..c2dd86c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-04-28 Julian Brown + + * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak + import. + 2005-04-27 H.J. Lu * elf-bfd.h (bfd_elf_sym_name): Also take "asection *". diff --git a/bfd/elflink.c b/bfd/elflink.c index a1c0232..23eafc0 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; -- 2.7.4