From c151be7e42654635a70e14a60a921f356927d789 Mon Sep 17 00:00:00 2001 From: Song Liu Date: Thu, 15 Jan 2026 13:54:15 -0800 Subject: [PATCH] kpatch-build: Add .L__const symbols to maybe_discarded_sym Clang uses .L__const symbols for some constant variables, which is later removed by ld.lld. Add them to maybe_discarded_sym, so that we can avoid rare errors like: couldn't find matching xxx.c local symbols in vmlinux symbol table Signed-off-by: Song Liu --- kpatch-build/lookup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index ead2e04c3..c8ae38c41 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -85,6 +85,7 @@ static bool maybe_discarded_sym(const char *name) strstr(name, "__addressable_") || strstr(name, "__UNIQUE_ID_") || !strncmp(name, ".L.str", 6) || + !strncmp(name, ".L__const", 9) || is_ubsan_sec(name)) return true;