Re: [PATCH v2 35/53] objtool/klp: Create empty checksum sections for function-less object files

From: Miroslav Benes

Date: Tue May 05 2026 - 07:45:16 EST


On Thu, 30 Apr 2026 21:08:23 -0700, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> If an object file has no functions, objtool has nothing to checksum, so
> it doesn't create the .discard.sym_checksum symbol.
>
> Then when 'objtool klp diff' reads symbol checksums, it errors out due
> to the missing .discard.sym_checksum section.
>
> Instead, just create an empty checksum section to signal to
> read_sym_checksums() that the file has been processed.
>
> [...]

Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>

--
Miroslav