From: Josh Poimboeuf Date: Mon, 13 Apr 2026 05:40:02 +0000 (-0700) Subject: objtool/klp: Don't set sym->file for section symbols X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d4cbb6d0caf03b0a22be4d6d2198a9edac46517;p=thirdparty%2Flinux.git 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) Acked-by: Song Liu Signed-off-by: Josh Poimboeuf --- diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index f41280e454ca4..d9cee8d5d9e8f 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -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; }