[PATCH][RFC] add --enable-zstd-compressed-debug-sections configure option

Martin Liška mliska@suse.cz
Fri Sep 30 12:42:28 GMT 2022


On 9/30/22 13:25, Pedro Alves wrote:
> On 2022-09-30 10:48 a.m., Martin Liška wrote:
>> Hello.
>>
>> The patch can set up default compression algorithm as zstd instead of the
>> default zlib-gabi.
>>
>> The patch is lightly tested as readelf can't decompress debug sections:
>> https://sourceware.org/bugzilla/show_bug.cgi?id=29640
>>
>> Thoughts?
>>
>> ChangeLog:
>>
>> 	* configure.ac: Add --enable-zstd-compressed-debug-sections
>> 	configure option.
>> 	* configure: Regenerate.
> 
> This may become a bit awkward in the future when other better format appears, and you want to
> switch to use it by default.  Like, imagine zstd2 is invented.  At that point we'd have to decide
> whether to add code to error out if the user specifies both
>    "--enable-zstd-compressed-debug-sections --enable-zstd2-compressed-debug-sections",
> or always pick the latter option, or some such.  

Understood.

> 
> IMHO, it seems cleaner and more future proof to add instead:
> 
>   --enable-default-compressed-debug-sections=zlib|zlib-gnu|zlib-gabi|zstd
> 
> WDYT?

Yep, it's much nicer. Anyway, lemme try preparing a patch that does a bit of refactoring
before I introduce such a patch.

Martin

> 
> Pedro Alves



More information about the Binutils mailing list