public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Fangrui Song <i@maskray.me>
Cc: binutils@sourceware.org, Alan Modra <amodra@gmail.com>
Subject: Re: Support objcopy changing compression to or from zstd
Date: Wed, 5 Oct 2022 08:02:26 +0200	[thread overview]
Message-ID: <88104e82-8c29-058f-557e-3a040ccf797a@suse.com> (raw)
In-Reply-To: <20221004220134.ifx4i33v2obhzitr@gmail.com>

On 05.10.2022 00:01, Fangrui Song wrote:
> On 2022-10-04, Alan Modra via Binutils wrote:
>> Commit 2cac01e3ffff lacked support for objcopy changing compression
>> style.  Add that support, which meant a rewrite of
>> bfd_compress_section_contents.  In the process I've fixed some memory
>> leaks.
> 
> For objcopy --compress-debug-sections=zstd , I know that omitting
> recompression of zlib into zstd was intentional.  --compress-debug-sections=zstd 
> does not specify what to do when a section is compressed, so both (a)
> do nothing (b) re-compression with zstd are fine but I think
> avoiding recompression can avoid some complexity...
> 
> If a .o is compressed with zlib level 5, should --compress-debug-sections=zlib
> re-compress it or leave it as-is?
> 
> At any rate, I think the  objcopy --compress-debug-sections=zstd
> behavior with zlib compressed sections is mostly not interesting to a
> user.

Considering that --compress-debug-sections=none means "decompress"
rather than "leave alone" (which I would consider more reasonable),
I think it is a logical consequence that =zstd means "(re)compress"
(even if, like for =none, I'm not convinced this is the best
possible behavior). In any event, even more so now that there are
two truly distinct compression methods, I think a way to express
such variants is quite desirable, perhaps even necessary.

Jan

  reply	other threads:[~2022-10-05  6:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04  8:13 Alan Modra
2022-10-04 22:01 ` Fangrui Song
2022-10-05  6:02   ` Jan Beulich [this message]
2022-10-05 21:04   ` Alan Modra

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=88104e82-8c29-058f-557e-3a040ccf797a@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@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).