This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PLT call stub for ppc64
- From: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 07 Nov 2012 18:45:49 -0200
- Subject: Re: [PATCH] Fix PLT call stub for ppc64
- References: <201211071921.qA7JLDSI011279@d06av02.portsmouth.uk.ibm.com>
On 11/07/2012 05:21 PM, Ulrich Weigand wrote:
> Hmm, looking at the binutils patch, it seems to me that the static chain load
> in the *other* PLT stubs (ppc64_standard_linkage1, ppc64_standard_linkage2)
> should now also be marked as optional, shouldn't it?
>
Thanks a lot for the comment, Ulrich.
Here's the new version of the patch, updating the other PLT stubs patterns
accordingly.
--
Edjunior
gdb/ChangeLog
2012-11-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-tdep.c: Mark ld r11 instructions as optional, following the
change in PLT call stubs on linker.
---
gdb/ppc-linux-tdep.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index ccded83..f88d697 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -390,8 +390,8 @@ static struct insn_pattern ppc64_standard_linkage1[] =
/* mtctr r11 */
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), 0 },
- /* ld r11, <any>(r12) */
- { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
+ /* ld r11, <any>(r12) <optional> */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 1 },
/* bctr */
{ -1, 0x4e800420, 0 },
@@ -421,8 +421,8 @@ static struct insn_pattern ppc64_standard_linkage2[] =
/* ld r2, <any>(r12) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 },
- /* ld r11, <any>(r12) */
- { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
+ /* ld r11, <any>(r12) <optional> */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 1 },
/* bctr */
{ -1, 0x4e800420, 0 },
@@ -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