[PATCH] elf: Report corrupted group section

Jan Beulich jbeulich@suse.com
Mon Jun 23 06:28:21 GMT 2025


On 21.06.2025 00:54, H.J. Lu wrote:
> Report corrupted group section instead of trying to recover.
> 
> PR binutils/33050
> * elf.c (bfd_elf_set_group_contents): Report corrupted group
> section.

The check ahead of the BFD_ASSERT() that you replace isn't quite in sync
with the comment ahead of it. Instead that comment extends to the 2nd
check further down as well. The latest with your adjustment, is there any
reason the two if() can't simply be combined into just one? Possible
concerns towards UB don't look to be (fully) taken care of by that split,
so apparently that wasn't the original reason to write it like this.

Jan


More information about the Binutils mailing list