This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/11786] PIE support may not work for some PIEs
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 25 Oct 2013 18:56:30 +0000
- Subject: [Bug gdb/11786] PIE support may not work for some PIEs
- Auto-submitted: auto-generated
- References: <bug-11786-4717 at http dot sourceware dot 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.