aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
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
commit0291d2913e5079196f586d80a3424c835aec736e (patch)
treeb231ba5afac5bcdb2af81f96707ee123723a701b /bfd/elflink.c
parent0002be373a5c7cf3d92aa56ad4fe35897ab98292 (diff)
downloadgdb-0291d2913e5079196f586d80a3424c835aec736e.zip
gdb-0291d2913e5079196f586d80a3424c835aec736e.tar.gz
gdb-0291d2913e5079196f586d80a3424c835aec736e.tar.bz2
Applied this patch for Julian Brown <julian@codesourcery.com>
* elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak import.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c4
1 files changed, 3 insertions, 1 deletions
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;