Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb@sourceware.org, amodra@gmail.com
Subject: Re: PowerPC SecurePLT - stepping into library function
Date: Sat, 07 Jan 2012 20:57:00 -0000	[thread overview]
Message-ID: <4F08B1A6.1000602@eagerm.com> (raw)
In-Reply-To: <201201062056.q06KuBZo001389@glazunov.sibelius.xs4all.nl>

On 01/06/2012 12:56 PM, Mark Kettenis wrote:
>> Date: Fri, 06 Jan 2012 12:24:38 -0800
>> From: Michael Eager<eager@eagerm.com>
>>
>> https://www.power.org/resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Linux.pdf
>
> Thanks!
>
> I guess you'll have to do some sort of instruction pattern matching.
> The ABI document suggests specific code sequences for them, which is
> probably what everybody uses to implement them.  You might want to
> have a look at what is done in mips-linux-tdep.c, since it seems to
> have linkage stubs outside of the PLT as well.  Actually closer to
> home the 64-bit PowerPC stuff seems to do somethings similar.

mips and ppc64 seem to do the similar tests, but in different places.

mips adds instruction pattern matching to the in_solib_dynsym_resolve()
test at infrun.c:4755 so that it succeeds, entering a block of code
which skips the symbol resolver.

ppc64 does instruction pattern matching to skip over trampoline code,
called at infrun.c:4902 but since it calls the same failing
in_solib_dynsym_resolve() a couple lines later, I don't think that it
has any effect.

Looks like doing the same as mips is the best approach.

Thanks for the pointer.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


      reply	other threads:[~2012-01-07 20:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 19:54 Michael Eager
2012-01-06 20:09 ` Joseph S. Myers
2012-01-06 20:27   ` Michael Eager
2012-01-06 20:15 ` Mark Kettenis
2012-01-06 20:24   ` Michael Eager
2012-01-06 20:56     ` Mark Kettenis
2012-01-07 20:57       ` Michael Eager [this message]

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=4F08B1A6.1000602@eagerm.com \
    --to=eager@eagerm.com \
    --cc=amodra@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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