From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
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 [thread overview]
Message-ID: <1352315215-30592-1-git-send-email-emachado@linux.vnet.ibm.com> (raw)
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 <emachado@linux.vnet.ibm.com>
* 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, <any>(r2) */
- { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 0 },
+ /* ld r11, <any>(r2) <optional> */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 1 },
/* ld r2, <any>(r2) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 2, 0, 0), 0 },
--
1.7.10.1
next reply other threads:[~2012-11-07 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 19:07 Edjunior Barbosa Machado [this message]
2012-11-07 19:21 ` Ulrich Weigand
2012-11-07 20:46 ` Edjunior Barbosa Machado
2012-11-08 13:45 ` Ulrich Weigand
2012-11-08 14:28 ` Edjunior Barbosa Machado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352315215-30592-1-git-send-email-emachado@linux.vnet.ibm.com \
--to=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox