[PATCH v2] coff: Ignore corrupt relocation table in linker input
Jan Beulich
jbeulich@suse.com
Tue Sep 23 14:27:20 GMT 2025
On 23.09.2025 02:17, H.J. Lu wrote:
> On Tue, Sep 23, 2025 at 7:12 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 22.09.2025 01:33, H.J. Lu wrote:
>>> Here is the patch to ignore slurp corrupt relocation table
>>> in linker input to avoid linker crash later.
>>
>> Returning false here will make coff_canonicalize_reloc() return -1.
>> Some callers can't deal with that at all, while e.g.
>> ldlang.c:copy_section() would then emit a bogus error message.
>>
>> Seeing that ecoff.c copied most of coffcode.h I would also wonder
>> whether that shouldn't gain the same change, whichever one that might
>> end up being.
>
> I am not familiar with COFF. This is my very limited attempt to avoid
> ELF linker crash on corrupt COFF linker input.
Let me see what I can do, but it'll be no earlier than in a few weeks time.
Jan
More information about the Binutils
mailing list