This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/11786] PIE support may not work for some PIEs


https://sourceware.org/bugzilla/show_bug.cgi?id=11786

--- Comment #9 from Jan Kratochvil <jan.kratochvil at redhat 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?

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]