Ok, so gas now has an option to produce them that way.
That's pretty inane, but so it is.
Admittedly, a more principled approach would have been to add an
SHF_COMPRESSED flag to ELF without changing the section name, but the
".zdebug_" approach matches what was done a few years ago for ET_EXEC
files. It's also easier to handle it that way in the non-ELF file
How does the rest of binutils deal with this? Does it decompress
pretend it was called .foo and then apply a .rel.foo section's relocs to
Yes. There's a BFD flag that lets the client specify whether it wants
to see the decompressed contents or not. If you're asking for
relocated section contents, it'll decompress first.
(I guess the name of the reloc section doesn't actually matter,
it's just following the sh_info pointer as it should.)