[PATCH v2] coff: Ignore corrupt relocation table in linker input
H.J. Lu
hjl.tools@gmail.com
Tue Sep 23 00:17:11 GMT 2025
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.
>
> Jan
I am not familiar with COFF. This is my very limited attempt to avoid
ELF linker crash on corrupt COFF linker input.
--
H.J.
More information about the Binutils
mailing list