Project:Toolchain/Binutils 2.32 upgrade notes/elfutils 0.175: unable to initialize decompress status for section .debug info

The problem
If you get the link failures similar to the following this article is for you:

Or if your gdb session fails as:

The solution
This is a result of new dev-libs/elfutils being used against old binutils (or old gdb).

To fix it you need to switch active binutils to sys-devel/binutils-2.32 (and to >=gdb-8.3) or above and rebuild the affected packages.

The details
Starting from dev-libs/elfutils-0.175 libelf writes compressed section alignment according to the ELF spec (see https://sourceware.org/PR23916). Unfortunately GNU assembler (gas from binutis-2.31.1 and older) writes non-conformant alignment. This means that libelf processing of such ELF files "corrupts" object files for binutils-2.31.

binutils-2.32 now writes conformant ELF alignments (see https://sourceware.org/PR23919) but the result is not compatible to binutils-2.31.

The only affected sections are compressed debug sections. If you want to repair existing object files built with FEATURES=compressdebug it should be enough to strip files on disk.