From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22383 invoked by alias); 6 Sep 2013 17:04:39 -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 22347 invoked by uid 48); 6 Sep 2013 17:04:38 -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 17:04: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/msg00329.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=11786 --- Comment #9 from Jan Kratochvil --- (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? That is a great idea. I have verified build-id computations checksum also the relevant parts of program headers and section headers. > 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. OK, that should be sure safe to ignore p_flags and p_align of GNU_RELRO. (I am curious you do not use separate .debug file instead of unstripped file bat that is off-topic here.) (In reply to dje from comment #8) > btw, 2da7921acc5c7b327b3619a95ca7ca36a0314dc4: kinda meaningless without > some reference to a repository. For archeology's sake, IWBN to record that > here. http://sourceware.org/git/?p=gdb.git - but (a) I am not sure if the new GDB GIT will not be on the same URL. (b) I believe we will need old hash -> new hash mapper anyway. -- You are receiving this mail because: You are on the CC list for the bug.