From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28440 invoked by alias); 26 Feb 2011 00:49:26 -0000 Received: (qmail 28432 invoked by uid 22791); 26 Feb 2011 00:49:26 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Feb 2011 00:49:20 +0000 Received: by mail-wy0-f169.google.com with SMTP id 11so2570441wyi.0 for ; Fri, 25 Feb 2011 16:49:19 -0800 (PST) Received: by 10.227.143.65 with SMTP id t1mr2717816wbu.42.1298681359562; Fri, 25 Feb 2011 16:49:19 -0800 (PST) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com [82.6.108.62]) by mx.google.com with ESMTPS id u9sm1026396wbg.18.2011.02.25.16.49.18 (version=SSLv3 cipher=OTHER); Fri, 25 Feb 2011 16:49:18 -0800 (PST) Message-ID: <4D684DFB.7010500@gmail.com> Date: Sat, 26 Feb 2011 00:49:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: "binutils@sourceware.org" Subject: Re: [6/6][PATCH] Respect symbol wrappers when computing symbol resolutions. References: <4D684CB8.6020106@gmail.com> <4D684D00.70803@gmail.com> <4D684D79.9090708@gmail.com> In-Reply-To: <4D684D79.9090708@gmail.com> Content-Type: multipart/mixed; boundary="------------080704080701070000000605" Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00338.txt.bz2 This is a multi-part message in MIME format. --------------080704080701070000000605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 22 The missing diff. --------------080704080701070000000605 Content-Type: text/x-c; name="006ld-plugin-sym-wrappers.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="006ld-plugin-sym-wrappers.diff" Content-length: 1146 >From f1fdd296f2f4aac99a4ff959b0794f59a5557960 Mon Sep 17 00:00:00 2001 From: Dave Korn 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; --------------080704080701070000000605--