New ch_type value ELFCOMPRESS_ZSTD?

Fangrui Song i@maskray.me
Mon Jun 27 06:38:59 GMT 2022


I created https://groups.google.com/g/generic-abi/c/satyPkuMisk ("Add new
ch_type value: ELFCOMPRESS_ZSTD") after I saw that on LLVM side, Cole Kissane
proposes that we add Zstandard as new compression method (mainly for .debug*
sections, but also for some LLVM internal things)
https://discourse.llvm.org/t/rfc-zstandard-as-a-second-compression-method-to-llvm/63399

This makes a lot of sense to me as I know compression/uncompression takes a lot
of compile/link time.  If people agree that this is a good direction, I wish
that we can have a generic-abi value: ELFCOMPRESS_ZSTD 2.  If that does not
work, perhaps we need a GNU ABI value.

We will need features from a bunch of tools:

* GCC/Clang: perhaps we can introduce a new driver option -gz=zstd
* GNU assembler: add --compress-debug-sections=zstd
* GNU ld: add --compress-debug-sections=zstd
* objcopy/llvm-objcopy: add --compress-debug-sections=zstd
* gdb: support Zstandard
* elfutils: support Zstandard


More information about the Gnu-gabi mailing list