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, 06 Sep 2013 16:42:00 -0000	[thread overview]
Message-ID: <bug-11786-4717-Vh82XnsTlW@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 #8 from dje at google dot com ---
(In reply to Jan Kratochvil from comment #5)
> (In reply to dje from comment #3)
> > suppose we ignore the flags field for all segments: what's the
> > worst that could happen?
> 
> If you use non-matching build of an executable it may get incorrectly
> relocated by some small displacement.  (*1)
> 
> People sometimes try to use non-matching build, IMO it cannot give
> meaningful output but it may make their attempts even more difficult when
> the executable gets "randomly" displaced.  Currently GDB does not display
> any notice it used PIE displacement (and there is also no longer any notice
> it used PIC displacement), unless one has "set verbose" (which nobody has). 
> This may make a falsely-matched displacement a pain.
> 
> (*1) Currently the displacement still has to be PAGE_SIZE aligned, if it is
> not PAGE_SIZE aligned no displacement gets used.  But I have TODOlisted I
> should recheck the PAGE_SIZE requirement as it was removed for shlibs by
> 2da7921acc5c7b327b3619a95ca7ca36a0314dc4 and IMO it should be equally
> removed for compatibility with prelinked/unprelinked PIE executables.

If the addresses/displacements are different, sure.  One recognizes that going
in.
But I asked about the flags field.

btw, 2da7921acc5c7b327b3619a95ca7ca36a0314dc4:  kinda meaningless without some
reference to a repository.  For archeology's sake, IWBN to record that here.

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


  parent reply	other threads:[~2013-09-06 16:42 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 [this message]
2013-09-06 17:04 ` jan.kratochvil at redhat dot com
2013-10-25 18:56 ` dje at google dot com
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-Vh82XnsTlW@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).