public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Fangrui Song <i@maskray.me>
Cc: binutils@sourceware.org, gdb@sourceware.org,
	gnu-gabi@sourceware.org, gcc@gcc.gnu.org
Subject: Re: New ch_type value ELFCOMPRESS_ZSTD?
Date: Tue, 28 Jun 2022 12:25:40 +0100	[thread overview]
Message-ID: <874k05hvwr.fsf@esperi.org.uk> (raw)
In-Reply-To: <20220627063859.27tgplebjcyxxdwi@gmail.com> (Fangrui Song's message of "Sun, 26 Jun 2022 23:38:59 -0700")

On 27 Jun 2022, Fangrui Song stated:

> I created https://groups.google.com/g/generic-abi/c/satyPkuMisk ("Add new
> ch_type value: ELFCOMPRESS_ZSTD") after I saw that on LLVM side, Cole Kissane
> proposes that we add Zstandard as new compression method (mainly for .debug*
> sections, but also for some LLVM internal things)
> https://discourse.llvm.org/t/rfc-zstandard-as-a-second-compression-method-to-llvm/63399

The next CTF format will be compressed with zstd too (if available),
fwiw. It's pretty obviously the right thing to go with these days for
anything but specialized use cases. So (though my opinion counts for
nothing) I think this is an excellent direction to go in.

(Of course, if zstd isn't folded into the binutils source tree like zlib
is, we have the interesting problem of what to do if it's not available
at build time. If zstd compression is optional, and not available in the
existing binutils, and gdb or objdump or something needs to read a
zstd-compressed debug section, what do we do? Error out? Whatever it is
we end up doing, I'll make libctf do the same thing in the same
situation.

Pointless detail: this will hardly ever impair use of things like ld
that must keep working because ld inputs are usually compiler output,
and the CTF in there is entirely uncompressed and undeduplicated. Only
using ld -r outputs as inputs to ld would be affected, and that's a rare
use case that is usually done as part of the same build process on the
same machine, and that use case would *also* keep working whether zstd
was available or not. The only case that might be impacted is users like
GDB being asked to read zstd-compressed sections when GDB was not
compiled with zstd support, and that's the same problem we'd have if the
same binary contained DWARF debuginfo and the same GDB were asked to
read it.)

-- 
NULL && (void)

      reply	other threads:[~2022-06-28 11:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27  6:38 Fangrui Song
2022-06-28 11:25 ` Nick Alcock [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k05hvwr.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sourceware.org \
    --cc=gnu-gabi@sourceware.org \
    --cc=i@maskray.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).