From 1069d212fd848f1f1e2425dffe8e9aea188c6150 Mon Sep 17 00:00:00 2001 From: Zhipeng Xie Date: Tue, 21 Dec 2083 12:18:38 +0800 Subject: [PATCH] fix ref static local symbol for longname symbol static local symbol have a "." which will confuse the kernel livepatch klp_resolve_symbols. So, pass static local symbols in lookup_ref_symbol_offset. Signed-off-by: Zhipeng Xie --- kpatch-build/lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index 2e55862..01abc41 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -591,7 +591,8 @@ int lookup_ref_symbol_offset(struct lookup_table *table, char *name, /*find a unique symbol in the same section first*/ for_each_obj_symbol(i, sym, table) { if (!strcmp(sym->name, name) || sym->type == STT_FILE || - sym->sec_index != orig_sym->sec_index) + sym->sec_index != orig_sym->sec_index || + strchr(sym->name, '.')) continue; if (!lookup_is_duplicate_symbol(table, sym->name, objname, 1)) { -- 2.19.1