From: Song Liu <song@kernel.org>
To: live-patching@vger.kernel.org
Cc: jpoimboe@kernel.org, kernel-team@meta.com, jikos@kernel.org,
mbenes@suse.cz, pmladek@suse.com, joe.lawrence@redhat.com,
Song Liu <song@kernel.org>
Subject: [PATCH] klp-build: Do not warn "no correlation" for __irf_[start|end]
Date: Fri, 30 Jan 2026 12:39:12 -0800 [thread overview]
Message-ID: <20260130203912.2494181-1-song@kernel.org> (raw)
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 throwing warnings like:
vmlinux.o: warning: objtool: no correlation: __irf_start
vmlinux.o: warning: objtool: no correlation: __irf_end
Fix this by not warn for no correlation before seeing the first FILE
entry.
Signed-off-by: Song Liu <song@kernel.org>
---
tools/objtool/klp-diff.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index d94531e3f64e..370e5c79ae66 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -363,6 +363,7 @@ static int correlate_symbols(struct elfs *e)
{
struct symbol *file1_sym, *file2_sym;
struct symbol *sym1, *sym2;
+ bool found_first_file = false;
/* Correlate locals */
for (file1_sym = first_file_symbol(e->orig),
@@ -432,9 +433,12 @@ static int correlate_symbols(struct elfs *e)
}
for_each_sym(e->orig, sym1) {
+ if (!found_first_file && is_file_sym(sym1))
+ found_first_file = true;
if (sym1->twin || dont_correlate(sym1))
continue;
- WARN("no correlation: %s", sym1->name);
+ if (found_first_file)
+ WARN("no correlation: %s", sym1->name);
}
return 0;
--
2.47.3
next reply other threads:[~2026-01-30 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 20:39 Song Liu [this message]
2026-01-31 2:26 ` [PATCH] klp-build: Do not warn "no correlation" for __irf_[start|end] Josh Poimboeuf
2026-02-01 4:26 ` Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260130203912.2494181-1-song@kernel.org \
--to=song@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=kernel-team@meta.com \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox