This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [6/6][PATCH] Respect symbol wrappers when computing symbol resolutions.
The missing diff.
>From f1fdd296f2f4aac99a4ff959b0794f59a5557960 Mon Sep 17 00:00:00 2001
From: Dave Korn <dave.korn.cygwin@gmail.com>
Date: Thu, 24 Feb 2011 04:58:40 +0000
Subject: [PATCH] Respect symbol wrappers when computing symbol resolutions.
ld/ChangeLog:
2011-02-24 Dave Korn <...
* plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
---
ld/plugin.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ld/plugin.c b/ld/plugin.c
index db3ad07..f9ee9f1 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -456,9 +456,12 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
struct bfd_link_hash_entry *blhe;
bfd_boolean ironly;
asection *owner_sec;
-
- blhe = bfd_link_hash_lookup (link_info.hash, syms[n].name,
- FALSE, FALSE, TRUE);
+ if (syms[n].def != LDPK_UNDEF)
+ blhe = bfd_link_hash_lookup (link_info.hash, syms[n].name,
+ FALSE, FALSE, TRUE);
+ else
+ blhe = bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info,
+ syms[n].name, FALSE, FALSE, TRUE);
if (!blhe)
{
syms[n].resolution = LDPR_UNKNOWN;