How the debug sections are compressed, which is what -gz asks.
Debug information is much larger than the code it describes and almost never read, so an ELF
section holding it may be stored compressed: the section keeps its name, gains the
SHF_COMPRESSED flag and starts with a header saying what it decompresses to, and every reader
that understands the flag unpacks it on the way in. A distribution that ships debug symbols for
everything it builds saves more from this than from anything else it passes.
Nothing here compresses one yet, so every answer produces the same bytes and an object built
with -gz=zstd is identical to one built without the flag. There are sections to compress now,
which makes this a flag waiting on a compressor rather than one waiting on a producer, and
crates/rucc-debug is where that is written down.
-gz and -gz=zlib. The ELF way, with the SHF_COMPRESSED flag and an Elf64_Chdr in
front of the data. Bare -gz means this one, which is worth knowing because the manual
describes the flag without saying so.
-gz=zlib-gnu. The older way, where the section is renamed from .debug_info to
.zdebug_info and carries ZLIB and a length instead of a real header. Kept because
binutils still reads it and some build systems still ask for it by name.