For an ELFCLASS32 object, a compressed section due to --compress-debug-sections={zlib,zstd} has a
tail padding of 12 zero bytes. zlib happily allows this while zstd is rigid and
reports error: '{{.*}}': failed to decompress section '.debug_foo': Src size is incorrect.
Cole Kissane reported the problem to me.
Actually one question: this seems to be assuming that BE and LE Elf_Chdr_Impl are the same size. I assume that's intentional, and it's fine if it is, but perhaps it deserves a static_assert or similar to protect us in case something odd changes in the future?