* Re: binutils/gdb vs compressed debug ELF sections
[not found] <9fd4346efba926051011471017b5d683faacc37d.camel@klomp.org>
@ 2019-02-26 20:20 ` Pedro Alves
0 siblings, 0 replies; only message in thread
From: Pedro Alves @ 2019-02-26 20:20 UTC (permalink / raw)
To: Mark Wielaard, Matthias Klose, nickc, GDB Patches
(Really adding gdb-patches@ this time.)
Hi all,
On 02/19/2019 01:37 PM, Mark Wielaard wrote:
> Hi Pedro and Nick and Matthias,
>
> I was talking to Matthias and Nick (separately) about the bugs in
> binutils wrt compressed debug ELF sections. Luckily Fedora doesn't use
> compressed debug ELF sections by default, so the issue isn't such a big
> deal. But apparently Debian and Ubuntu do use compressed debug ELF
> sections by default, so there it is much more of an issue.
>
> The problem is simply that when using the new style gabi compressed ELF
> sections binutils/bfd has a bug that will set the alignment of the
> section header wrong and it will simply ignore the alignment of the
> (de)compressed data. This is somewhat understandable because the old
> style GNU compressed headers didn't deal with alignment issues at all.
> But it is what we corrected when the ELF compressed sections were
> standardized. This was fixed in binutils 2.32.
>
> And since elfutils 0.175 libelf will correct the alignment of gabi
> compressed section headers when it writes out an ELF file (for example
> when using eu-strip or the kernel objtool).
>
> Unfortunately binutils also had another bug that would reject gabi
> style ELF compressed sections unless the alignment of the ELF section
> header was equal to the alignment of the (de)compressed data. That was
> a weird check because that would normally not be the case (except if
> you did as buggy binutils and always set the alignment to 1 for
> everything...).
>
> Nick just backported both fixes to the binutils 2.31 branch:
>
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=88739f776b733b0b84600b283417f862a010bb5d
>
> Since this fix is in bfd it would be nice to get gdb to also backport
> that fix to a stable release branch. Otherwise gdb will reject any
> newly created ELF compressed sections by either elfutils or binutils.
>
> Does gdb have a stable branch? And could it backport that bfd fix?
> That would be really helpful for distributions like Debian/Ubuntu which
> can then upgrade elfutils, binutils and gdb together to make sure
> everything keeps working.
Seems reasonable. I've now merged Nick's commit 88739f776b73 to
the gdb 8.2 branch.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-26 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <9fd4346efba926051011471017b5d683faacc37d.camel@klomp.org>
2019-02-26 20:20 ` binutils/gdb vs compressed debug ELF sections Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).