[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW6YtAAdNkKS=c9tJ7M7BonKmsOwop2xmL9+EkkcjhrmpQ@mail.gmail.com>
Date: Mon, 2 Feb 2026 13:56:24 -0800
From: Song Liu <song@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
live-patching@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] objtool/klp: Fix symbol correlation for orphaned local symbols
On Mon, Feb 2, 2026 at 10:01 AM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> When compiling with CONFIG_LTO_CLANG_THIN, vmlinux.o has
> __irf_[start|end] before the first FILE entry:
>
> $ readelf -sW vmlinux.o
> Symbol table '.symtab' contains 597706 entries:
> Num: Value Size Type Bind Vis Ndx Name
> 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
> 1: 0000000000000000 0 NOTYPE LOCAL DEFAULT 18 __irf_start
> 2: 0000000000000200 0 NOTYPE LOCAL DEFAULT 18 __irf_end
> 3: 0000000000000000 0 SECTION LOCAL DEFAULT 17 .text
> 4: 0000000000000000 0 SECTION LOCAL DEFAULT 18 .init.ramfs
>
> This causes klp-build warnings like:
>
> vmlinux.o: warning: objtool: no correlation: __irf_start
> vmlinux.o: warning: objtool: no correlation: __irf_end
>
> The problem is that Clang LTO is stripping the initramfs_data.o FILE
> symbol, causing those two symbols to be orphaned and not noticed by
> klp-diff's correlation logic. Add a loop to correlate any symbols found
> before the first FILE symbol.
>
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
> Reported-by: Song Liu <song@...nel.org>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
Acked-by: Song Liu <song@...nel.org>
Powered by blists - more mailing lists