[PATCH v2] elf: Don't match corrupt section header in linker input
H.J. Lu
hjl.tools@gmail.com
Tue Sep 23 00:14:12 GMT 2025
On Tue, Sep 23, 2025 at 7:21 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 22.09.2025 01:34, H.J. Lu wrote:
> > Here is the v2 patch to reject link input with corrupt section header.
>
> What's the (user visible) effect of this failing to match? I.e. what
> potentially entirely off diagnostic are they going to see? Or is there
> perhaps a risk of seeing the same diagnostic multiple times, because
> of further matching attempts? And is the warning issued here guaranteed
> to be followed by another, stronger diagnostic?
>
> Jan
The corrupt linker input will be rejected by linker:
./ld --version-exports-section symbol --shared -o pr33457.so pr33457.o
./ld: warning: pr33457.o has a section extending past end of file
pr33457.o: file not recognized: file format not recognized
instead of linker crash.
--
H.J.
More information about the Binutils
mailing list