[PATCH] Add --devel-skip-producer
Tom de Vries
tdevries@suse.de
Wed Mar 17 10:46:51 GMT 2021
On 3/16/21 10:27 PM, Mark Wielaard wrote:
> Hi Tom,
>
> On Tue, Mar 16, 2021 at 03:19:20PM +0100, Tom de Vries wrote:
>> In PR27588 a test-case was reported where dwz did not optimize due
>> to illegal DWARF produced by nasm:
>> ...
>> $ dwz libxul.so -o libxul.so.z
>> dwz: libxul.so: loclistptr attribute, yet no .debug_loc section
>> ...
>>
>> Add an option --devel-skip-producer <producer> such that we can filter out
>> CUs coming from a particular producer, such that we have instead:
>> ...
>> $ readelf -wi libxul.so | grep DW_AT_producer \
>> | sed 's/.*: //' | sort | uniq -c
>> 176 clang LLVM (rustc version 1.50.0)
>> 2 GNU AS 2.36.1
>> 2 GNU C11 11.0.1 20210315 (experimental) <SNIP>
>> 16 NASM 2.15.05
>> 76 yasm 1.3.0
>> $ dwz libxul.so -o libxul.so.z --devel-skip-producer NASM
>> $ readelf -wi libxul.so.z | grep DW_AT_producer \
>> | sed 's/.*: //' | sort | uniq -c
>> 176 clang LLVM (rustc version 1.50.0)
>> 2 GNU AS 2.36.1
>> 2 GNU C11 11.0.1 20210315 (experimental) <SNIP>
>> 76 yasm 1.3.0
>> ...
>>
>> Any comments?
>
> So this skips and then removes the whole CU (because we set die_remove
> on the cu_die)?
>
Yes.
> It is useful as --devel option, but I would be against it as non-devel
> option.
Could you explain in more detail why you would be against this as a
non-devel option? F.i., I'm curious, is it an abstract objection, or do
you foresee concrete problems with the approach?
Thanks,
- Tom
More information about the Dwz
mailing list