From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [patch] Relocate phdr in read_program_header
Date: Wed, 12 Oct 2011 18:50:00 -0000 [thread overview]
Message-ID: <j74ngp$gkr$1@dough.gmane.org> (raw)
In-Reply-To: <j655em$75r$1@dough.gmane.org>
ping?
On 11-09-30 03:31 PM, Aleksandar Ristovski wrote:
> Hello,
>
> When attaching to a process without the executable file, gdb reads
> pheaders from the target (solib-svr4.c: read_program_header).
>
> However, it does not take into account possibility of having PIE
> executable on the other end, resulting in trying to read from
> unrelocated phdr address.
>
> This patch addresses the issue by looking for PT_PHDR; if found, uses it
> to determine relocation and adjusts address before reading it from
> target memory.
>
> Testsuite on x86_64-unknown-linux-gnu did not show any regressions.
>
>
> Thanks,
>
>
> Aleksandar Ristovski
> QNX Software Systems
>
>
>
> ... Aleksandar Ristovski <aristovski@qnx.com>
>
> * solib-svr4.c (read_program_header): If PT_PHDR is present, use it
> to calculate correct address in case of PIE.
>
next parent reply other threads:[~2011-10-12 18:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <j655em$75r$1@dough.gmane.org>
2011-10-12 18:50 ` Aleksandar Ristovski [this message]
2011-10-12 19:27 ` Jan Kratochvil
2011-10-16 19:42 ` Jan Kratochvil
2011-10-17 16:29 ` Aleksandar Ristovski
2011-10-18 13:41 ` Jan Kratochvil
2011-10-18 14:14 ` Aleksandar Ristovski
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='j74ngp$gkr$1@dough.gmane.org' \
--to=aristovski@qnx.com \
--cc=gdb-patches@sources.redhat.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