Skip to content

Commit c151be7

Browse files
committed
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 <song@kernel.org>
1 parent 8a927e7 commit c151be7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kpatch-build/lookup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ static bool maybe_discarded_sym(const char *name)
8585
strstr(name, "__addressable_") ||
8686
strstr(name, "__UNIQUE_ID_") ||
8787
!strncmp(name, ".L.str", 6) ||
88+
!strncmp(name, ".L__const", 9) ||
8889
is_ubsan_sec(name))
8990
return true;
9091

0 commit comments

Comments
 (0)