From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7361 invoked by alias); 7 Nov 2012 19:07:18 -0000 Received: (qmail 7342 invoked by uid 22791); 7 Nov 2012 19:07:17 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,TW_XF X-Spam-Check-By: sourceware.org Received: from e24smtp04.br.ibm.com (HELO e24smtp04.br.ibm.com) (32.104.18.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Nov 2012 19:07:11 +0000 Received: from /spool/local by e24smtp04.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Nov 2012 17:07:07 -0200 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp04.br.ibm.com (10.172.0.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Nov 2012 17:07:05 -0200 Received: from d24relay02.br.ibm.com (d24relay02.br.ibm.com [9.13.184.26]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 5EE091DC0057 for ; Wed, 7 Nov 2012 14:07:05 -0500 (EST) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by d24relay02.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qA7J6xah32309326 for ; Wed, 7 Nov 2012 17:06:59 -0200 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qA7J74qv004917 for ; Wed, 7 Nov 2012 17:07:05 -0200 Received: from grandaddy.ibm.com ([9.8.15.210]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qA7J74KO004914; Wed, 7 Nov 2012 17:07:04 -0200 From: Edjunior Barbosa Machado To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com Subject: [PATCH] Fix PLT call stub for ppc64 Date: Wed, 07 Nov 2012 19:07:00 -0000 Message-Id: <1352315215-30592-1-git-send-email-emachado@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12110719-8936-0000-0000-0000087ED455 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00163.txt.bz2 Hi, GDB was unable to 'step' into a c/c++ function from a shared library on ppc64 due to a change in linker that removes a load instruction from the PLT call stub (http://sourceware.org/ml/binutils/2011-07/msg00141.html). This patch fixes this on GDB, marking the mentioned instruction as optional, since it still might appear if the linker is called with '--plt-static-chain'. It also solves some unexpected failures in the testuite on ppc64 (verified on fedora 17): -FAIL: gdb.base/gdb1555.exp: Step into shared lib function -FAIL: gdb.base/gdb1555.exp: Next while in a shared lib function -FAIL: gdb.base/gnu-ifunc.exp: step -FAIL: gdb.base/skip-solib.exp: step -FAIL: gdb.base/skip-solib.exp: bt -FAIL: gdb.base/so-impl-ld.exp: step into solib call -FAIL: gdb.base/so-impl-ld.exp: step in solib call -FAIL: gdb.base/so-impl-ld.exp: step out of solib call Ok to commit? Thanks, -- Edjunior gdb/ChangeLog 2012-11-07 Edjunior Machado * ppc-linux-tdep.c (ppc64_standard_linkage3): Mark ld r11 instruction as optional, following the change in PLT call stub on linker. --- gdb/ppc-linux-tdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index ccded83..fcffa7d 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -446,8 +446,8 @@ static struct insn_pattern ppc64_standard_linkage3[] = /* mtctr r11 */ { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), 0 }, - /* ld r11, (r2) */ - { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 0 }, + /* ld r11, (r2) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 1 }, /* ld r2, (r2) */ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 2, 0, 0), 0 }, -- 1.7.10.1