From: Jan Beulich <jbeulich@suse.com>
To: Tom de Vries <tdevries@suse.de>
Cc: binutils@sourceware.org, Michael Matz <matz@suse.de>,
Nick Clifton <nickc@redhat.com>, Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] gas: Add --force-compress-debug-sections
Date: Mon, 27 Feb 2023 10:03:03 +0100 [thread overview]
Message-ID: <c5166149-12df-3988-e880-01328a1f5862@suse.com> (raw)
In-Reply-To: <711d9da5-8f31-3f1e-530b-5ae01780fcad@suse.de>
On 24.02.2023 15:57, Tom de Vries wrote:
> On 2/24/23 15:26, Jan Beulich wrote:
>> On 24.02.2023 15:11, Tom de Vries wrote:
>>> On 2/24/23 14:23, Jan Beulich wrote:
>>>> On 24.02.2023 13:21, Tom de Vries wrote:
>>>>> On 2/24/23 12:28, Jan Beulich wrote:
>>>>>> I also wouldn't see anything wrong with something
>>>>>> like "...=force,zstd,none" - the last one(s) win. That's no different
>>>>>> from specifying a second instance of the option. And without that it
>>>>>> looks as if the parsing would end up simpler.
>>>>>
>>>>> OK, gave that a try.
>>>>
>>>> That's still accumulating none and force across the entire sequence
>>>> (and then giving none priority over force, no matter that force may
>>>> have been specified last),
>>>
>>> Um, so you're saying that none+zstd+force is currently interpreted as none?
>>>
>>> Lets try:
>>> ...
>>> $ gcc ~/hello.c -c -Wa,-gdwarf-5 -Xassembler
>>> --compress-debug-sections=none+zstd+force
>>> $ readelf -S -W hello.o | grep " .debug"
>>> [ 9] .debug_line PROGBITS 0000a8 000064 00 C 0 0 8
>>> [11] .debug_line_str PROGBITS 000110 000046 01 MSC 0 0 8
>>> [12] .debug_info PROGBITS 000158 000046 00 C 0 0 8
>>> [14] .debug_abbrev PROGBITS 0001a0 000049 00 C 0 0 8
>>> [15] .debug_aranges PROGBITS 0001f0 000034 00 C 0 0 8
>>> [17] .debug_str PROGBITS 000228 00005a 01 MSC 0 0 8
>>>
>>> ...
>>>
>>> So, that doesn't seem to be the case, compression is done, as expected.
>>
>> Oh, I've overlooked that you explicitly clear *none when you set *force
>> (my attention was mainly on the bottom of parse_compress_debug_optarg()).
>> I think that's more involved than necessary (possibly merely a result of
>> you having worked incrementally from your earlier version), and less
>> obviously doing the same as would happen when multiple separate options
>> were parsed.
>
> I've tried to simplify further.
>
> Is this more how you want it?
I have to admit that I'm still puzzled by the presence of
finalize_parse_compress_debug_optarg() as well as you needing both a new
static variable and a new global one. But I guess whether that's really
needed first of all depends on the semantics we want e.g.
--nocompress-debug-sections --compress-debug-sections=force
to have (which, with how you have it presently, could also be expressed
as
--compress-debug-sections=none+force
or
--compress-debug-sections=none --compress-debug-sections=force
afaict). I view the present meaning as one sensible one, but I could
also see "none" (or equivalent) simply zapping the compression type
(and hence rendering "force" meaningless) as another sensible one. A
change in meaning may then also result in the three option combinations
above possibly not all doing the same.
As an aside: As you update the patch, please try to keep the title in
line with what the patch actually does.
Also, ftaod, I don't mean to stand in the way of another maintainer
approving any of the forms proposed so far. This specifically also
includes the use of '+' as a separator, which I personally don't
(currently) intend to approve.
Jan
next prev parent reply other threads:[~2023-02-27 9:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 12:45 Tom de Vries
2023-02-23 13:08 ` Jan Beulich
2023-02-23 13:27 ` Tom de Vries
2023-02-23 13:44 ` Jan Beulich
2023-02-24 10:52 ` Tom de Vries
2023-02-24 11:28 ` Jan Beulich
2023-02-24 12:21 ` Tom de Vries
2023-02-24 13:23 ` Jan Beulich
2023-02-24 14:11 ` Tom de Vries
2023-02-24 14:26 ` Jan Beulich
2023-02-24 14:57 ` Tom de Vries
2023-02-27 9:03 ` Jan Beulich [this message]
2023-02-27 11:43 ` [PATCH] gas: Add --compress-debug-sections=force Tom de Vries
2023-02-27 11:51 ` Jan Beulich
2023-02-27 13:44 ` [PATCH] gas: Add --force-compress-debug-sections Pedro Alves
2023-02-27 14:07 ` Jan Beulich
2023-02-27 23:24 ` Tom de Vries
2023-02-28 0:19 ` Tom de Vries
2023-02-28 13:21 ` Pedro Alves
2023-02-28 12:49 ` Pedro Alves
2023-02-23 15:23 ` Michael Matz
2023-02-23 15:28 ` Tom de Vries
2023-02-23 15:44 ` Michael Matz
2023-02-23 15:46 ` Tom de Vries
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=c5166149-12df-3988-e880-01328a1f5862@suse.com \
--to=jbeulich@suse.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=matz@suse.de \
--cc=nickc@redhat.com \
--cc=tdevries@suse.de \
/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).