dwp needs to decompress compressed .dwo . gold needs to decompress compressed input sections and compress output debug sections. I can take a stab on this feature request.
Presumably some of this comes for free from common binutils infrastructure, like was the case for gdb, maybe?
bfd/compress.c is used by many utilities (objcopy/addr2line/objdump/etc), but gas/readelf need to implement their own. gold/dwp share code and need separate support as well. https://sourceware.org/pipermail/binutils/2022-October/123232.html [PATCH] gold, dwp: support zstd compressed input debug sections [PR 29641]
Closed by https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=332a4eeaea69034b8ee6f50b931ce6734b55bf08 https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=8b2d02cbb924f1f3718dc5a20f7a9dcf07739d23 Milestone: 2.40