[PATCH 06/48] objtool/klp: Don't correlate rodata symbols
From: Josh Poimboeuf
Date: Thu Apr 23 2026 - 00:06:24 EST
Some crypto assembly codes define the same local rodata labels (e.g.,
K256) which get duplicated when multiple .S files are linked into the
same composite object, triggering "Multiple correlation candidates"
errors.
Correlating rodata is tricky anyway, and not all rodata is associated
with a symbol. So just don't correlate any rodata, so that any
referenced data will get duplicated in the livepatch module.
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
tools/objtool/klp-diff.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index ea9ccf8c4ea9..f6597015b33b 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -374,6 +374,7 @@ static bool dont_correlate(struct symbol *sym)
is_uncorrelated_static_local(sym) ||
is_clang_tmp_label(sym) ||
is_string_sec(sym->sec) ||
+ is_rodata_sec(sym->sec) ||
is_addressable_sym(sym) ||
is_special_section(sym->sec) ||
is_special_section_aux(sym->sec) ||
--
2.53.0