[PATCH] readelf: Warn zero-sized relocation sections

Jan Beulich jbeulich@suse.com
Tue Apr 14 13:25:25 GMT 2020


On 14.04.2020 15:03, H.J. Lu wrote:
> On Tue, Apr 14, 2020 at 5:42 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 14.04.2020 14:25, H.J. Lu via Binutils wrote:
>>> Older linkers may fail with zero-sized relocation section in section
>>> group.
>>>
>>>       PR ld/25767
>>>       * readelf.c (process_section_headers): Warn zero-sized
>>>       relocation sections.
>>
>> Zero-sized sections of whatever kind are perfectly fine in ELF. I
>> see no reason why one would want to see a warning for such by
>> default.
> 
> Linkers older than 2.35 may fail with
> 
> ./ld: BFD (GNU Binutils) 2.34.50.20200402 assertion fail
> /export/gnu/import/git/gitlab/x86-binutils/bfd/elf.c:3652

Which is a bug, yes, but imo no reason to clutter readelf output.

Jan


More information about the Binutils mailing list