From: Michael Eager <eager@eagerm.com>
To: rsa@us.ibm.com
Cc: gdb-patches@sourceware.org,
Mark Kettenis <mark.kettenis@xs4all.nl>,
"Joseph S. Myers" <joseph@codesourcery.com>,
Pedro Alves <palves@redhat.com>
Subject: Re: [PATCH] PowerPC 32 with Secure PLT
Date: Wed, 25 Jan 2012 01:55:00 -0000 [thread overview]
Message-ID: <4F1F5708.5090500@eagerm.com> (raw)
In-Reply-To: <1327451846.3308.300.camel@localhost.localdomain>
On 01/24/2012 04:37 PM, Ryan Arnold wrote:
> On Tue, 2012-01-24 at 15:49 -0800, Michael Eager wrote:
>> On 01/17/2012 07:04 PM, Michael Eager wrote:
>>> This patch adds support for stepping into/over the PLT stubs generated
>>> for secure PLT on PowerPC 32. It requires a recent binutils which
>>> generates symbols for the stubs.
>>>
>>> This has been tested on PowerPC 32-bit systems with and without PAX.
>>>
>>> 2012-01-17 Michael Eager<eager@eagercon.com>
>>>
>>> * configure.tgt (powerpc-*-linux*): Add glibc-tdep.o.
>>> * ppc-linux-tdep.c: Include glibc-tdep.h.
>>> (powerpc32_plt_stub, powerpc32_plt_stub_so): Add PLT stub templates.
>>> (powerpc_linux_in_plt_stub): New function.
>>> (powerpc_linux_in_dynsym_resolve_code): New function.
>>> (ppc_skip_trampoline_code): New function.
>>> (ppc_linux_init_abi): Use PPC specific functions rather than generic.
>>> Use glibc_skip_solib_resolver.
>>
>> Will check in in a couple days, unless I hear additional comments.
>
> I'm not familiar with the GDB code at all so I couldn't tell from the
> patch whether it addresses my concern.
>
> Prior to resolving the PLT entries will this trap in the loader's
> resolver code or does it 'continue' until the PLT entry is populated and
> the target symbol address has been branched to?
It works in two phases: first steps over the stub to where ever it points
(which may be the target function), then it skips over the resolver code
if it still hasn't reached the function.
> It's fine with me if it skips the PLT stubs and the resolver trampoline
> code but being able to step into the resolver code is still useful to me
> as a GLIBC developer.
Most users don't want to see gdb stepping through symbol resolution
on the way to their library function.
I didn't run tests with a glibc which had debug symbols, but I think
that it will skip over the resolver if you say step. If you want to
stop at _dl_resolve, you will need to put a breakpoint at that location.
Naturally, if you do stepi, you see each instruction executed.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
next prev parent reply other threads:[~2012-01-25 1:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 3:36 Michael Eager
2012-01-25 0:37 ` Michael Eager
2012-01-25 1:12 ` Ryan Arnold
2012-01-25 1:55 ` Michael Eager [this message]
2012-01-30 17:19 ` Michael Eager
2012-01-18 4:00 Michael Eager
2012-01-18 12:18 ` Joel Brobecker
2012-01-18 16:37 ` Michael Eager
2012-01-18 16:45 ` Michael Eager
2012-01-18 17:03 ` Joel Brobecker
2012-01-18 18:23 ` Michael Eager
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=4F1F5708.5090500@eagerm.com \
--to=eager@eagerm.com \
--cc=gdb-patches@sourceware.org \
--cc=joseph@codesourcery.com \
--cc=mark.kettenis@xs4all.nl \
--cc=palves@redhat.com \
--cc=rsa@us.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