From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20653 invoked by alias); 25 Oct 2013 18:56:33 -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 20623 invoked by uid 48); 25 Oct 2013 18:56:32 -0000 From: "dje at google dot com" 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 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: dje at google 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-q4/txt/msg00113.txt.bz2 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.