objtool/klp: Don't set sym->file for section symbols

Section symbols aren't grouped after their corresponding FILE symbols.
Their sym->file should really be NULL rather than whatever random FILE
happened to be last.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
This commit is contained in:
Josh Poimboeuf 2026-04-12 22:40:02 -07:00
parent b6480aaedf
commit 8d4cbb6d0c

View File

@ -649,7 +649,7 @@ static int read_symbols(struct elf *elf)
if (is_file_sym(sym))
file = sym;
else if (sym->bind == STB_LOCAL)
else if (sym->bind == STB_LOCAL && !is_sec_sym(sym))
sym->file = file;
}