PowerPC SecurePLT - stepping into library function

Michael Eager eager@eagerm.com
Sat Jan 7 20:57:00 GMT 2012

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

More information about the Gdb mailing list