public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/11786] PIE support may not work for some PIEs
Date: Fri, 25 Oct 2013 18:56:00 -0000	[thread overview]
Message-ID: <bug-11786-4717-oGfhtrzt3k@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-11786-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=11786

--- Comment #10 from dje at google dot com ---
(In reply to Paul Pluzhnikov from comment #7)
> Would it be reasonable to check NT_GNU_BUILD_ID, and skip the Phdr check
> entirely on a match?
> 
> (In reply to Jan Kratochvil from comment #6)
> > Differently than... bfd ld?  gold vs. ld executables are a different build
> > which cannot match / is not guaranteed to match.
> 
> The flow here (Google b/10274851) is:
> 
>   (gold-linked, PIE) unstripped -> "strip -g" -> stripped -> core
> 
>   gdb stripped core    # works, but no debug info :-(
>   gdb unstripped core  # fails to relocate the binary :-(
> 
> Gold and strip do not agree on p_flags and p_align of GNU_RELRO,
> but the "unstripped" and "stripped" *are* exact match.

What if the core file doesn't have NT_GNU_BUILD_ID?
E.g., what if the program headers in the core file (obtained via auxv search,
ref: gdb/solib-svr4.c:read_program_header) refer to addresses only in the
executable?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2013-10-25 18:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-11786-4717@http.sourceware.org/bugzilla/>
2013-09-05 20:41 ` dje at google dot com
2013-09-05 20:59 ` jan.kratochvil at redhat dot com
2013-09-05 21:37 ` dje at google dot com
2013-09-05 21:45 ` dje at google dot com
2013-09-06  7:10 ` jan.kratochvil at redhat dot com
2013-09-06  7:13 ` jan.kratochvil at redhat dot com
2013-09-06 16:03 ` ppluzhnikov at google dot com
2013-09-06 16:42 ` dje at google dot com
2013-09-06 17:04 ` jan.kratochvil at redhat dot com
2013-10-25 18:56 ` dje at google dot com [this message]
2013-11-04 22:15 ` dje at google dot com
2013-11-08  0:45 ` cvs-commit at gcc dot gnu.org
2013-12-13 16:52 ` cvs-commit at gcc dot gnu.org
2014-05-12 15:36 ` derek.cole at gmail dot com
2014-05-12 16:13 ` jan.kratochvil at redhat dot com
2015-09-07  4:05 ` xdje42 at gmail dot com
2024-01-14 14:36 ` ssbssa at sourceware dot org
2010-07-02 17:14 [Bug gdb/11786] New: " jan dot kratochvil at redhat dot com
2010-08-12  8:28 ` [Bug gdb/11786] " devurandom at gmx dot net

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=bug-11786-4717-oGfhtrzt3k@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).