public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "i at maskray dot me" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29584] gdb: support zstd compressed .gnu_debugdata
Date: Thu, 16 Feb 2023 17:42:19 +0000 [thread overview]
Message-ID: <bug-29584-4717-QG1LPqsmsj@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29584-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29584
--- Comment #5 from Fangrui Song <i at maskray dot me> ---
(In reply to Mark Wielaard from comment #4)
> If we are changing the format, Can't we use standard ELF section compression?
> That supports zstd these days. Then the .gnu_debugdata can be just a normal
> ELF section, that is a mini-ELF image, which happens to be zstd compressed.
We can do that but it likely doesn't provide an overall advantage.
The .gnu_debugdata content is an ELF file, not a regular section.
We don't benefit from information like ch_type/ch_size/ch_addrline
in the Chdr header.
To embed an ELF file (with .symtab, .strtab, and optionally .debug_*), we need
one `objcopy --add-section` command, then one `eu-elfcompress -n` command (with
no binutils equivalent https://sourceware.org/bugzilla/show_bug.cgi?id=27452).
Even eu-elfcompress -n doesn't provide the various zstd options that a
distribution
may toggle. Also, this process involves two binary manipulation commands on
the ELF file.
If we use `zstd a.debug; objcopy -S --add-section=.gnu_debugdata=a.debug.zstd a
a.stripped`,
there is just one binary manipulation command, and we can toggle zstd options
easily.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2023-02-16 17:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 4:24 [Bug gdb/29584] New: " i at maskray dot me
2022-09-19 4:24 ` [Bug gdb/29584] " i at maskray dot me
2022-09-27 2:54 ` i at maskray dot me
2023-02-16 2:55 ` i at maskray dot me
2023-02-16 6:15 ` tromey at sourceware dot org
2023-02-16 6:25 ` i at maskray dot me
2023-02-16 9:08 ` mark at klomp dot org
2023-02-16 17:42 ` i at maskray dot me [this message]
2023-02-16 21:46 ` tromey at sourceware dot org
2023-02-19 13:23 ` mark at klomp dot org
2023-02-19 19:24 ` i at maskray dot me
2024-03-15 9:16 ` sam at gentoo dot org
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=bug-29584-4717-QG1LPqsmsj@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.org \
/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).