From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31530 invoked by alias); 6 Sep 2013 07:10:16 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 31491 invoked by uid 48); 6 Sep 2013 07:10:15 -0000 From: "jan.kratochvil at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/11786] PIE support may not work for some PIEs Date: Fri, 06 Sep 2013 07:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 7.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00325.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=11786 --- Comment #5 from Jan Kratochvil --- (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. -- You are receiving this mail because: You are on the CC list for the bug.