The pr326664 fuzzer testcase has two .debug_info sections, one
SHF_ALLOC, one not. SEC_DEBUGGING is never set for SHF_ALLOC sections
that happen to be named .debug_info, nor are they compressed. However
in this case we get an output section that is both SEC_ALLOC and
SEC_DEBUGGING which confuses code setting up the output section names
(.zdebug_* for compressed debug sections), resulting in a -1u index
into a string table.
PR 32664
* elf.c (elf_fake_sections): Do not delay naming of SEC_ALLOC
sections.
if (arg->link_info
&& (abfd->flags & BFD_COMPRESS) != 0
&& (asect->flags & SEC_DEBUGGING) != 0
+ && (asect->flags & SEC_ALLOC) == 0
&& name[1] == 'd'
&& name[6] == '_')
{