Zstandard is a "universal" compression algorithm which scales from low-ratio-very-fast to high-ratio-pretty-slow.
The generic-abi proposal https://groups.google.com/g/generic-abi/c/satyPkuMisk ("Add new ch_type value: ELFCOMPRESS_ZSTD") has been approved.
The default zstd -3 is easily 7x as fast as zlib level 1 while having a higher compression ratio.
See also https://sourceware.org/pipermail/gnu-gabi/2022q2/000498.html
binutils may need to:
* optional: import zstd/ as a toplevel directory like zlib/
* add configure.ac option --with-system-zstd
* gas: add --compress-debug-sections=zstd
* objcopy: add --compress-debug-sections=zstd
* ld: support ELFCOMPRESS_ZSTD input, add --compress-debug-sections=zstd
Add more tools to the list:
For objcopy --compress-debug-sections=zstd , I think it should apply only to uncompressed .debug_* sections. If a section is compressed by zlib, the format should not change.
If a user wants to ensure zlib sections are converted to zstd, run --decompress-debug-sections first.
https://sourceware.org/pipermail/gdb-patches/2022-September/191915.html [PATCH] binutils, gdb: support zstd compressed debug sections
(In reply to Fangrui Song from comment #2)
> [PATCH] binutils, gdb: support zstd compressed debug sections
The latest version is at https://sourceware.org/pipermail/binutils/2022-September/123085.html . The gdb part has been approved.
Fixed with commit 2cac01e3ff