Skip to content

Commit a2833d1

Browse files
committed
kallsyms: drop duplicated ignore patterns from kallsyms.c
Now that kallsyms.c parses the output from mksysmap, some symbols have already been dropped. Move comments to scripts/mksysmap. Also, make the grep command readable. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 94ff2f6 commit a2833d1

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

scripts/kallsyms.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ static bool is_ignored_symbol(const char *name, char type)
107107

108108
/* Symbol names that begin with the following are ignored.*/
109109
static const char * const ignored_prefixes[] = {
110-
"$", /* local symbols for ARM, MIPS, etc. */
111-
".L", /* local labels, .LBB,.Ltmpxxx,.L__unnamed_xx,.LASANPC, etc. */
112-
"__crc_", /* modversions */
113110
"__efistub_", /* arm64 EFI stub namespace */
114111
"__kvm_nvhe_$", /* arm64 local symbols in non-VHE KVM namespace */
115112
"__kvm_nvhe_.L", /* arm64 local symbols in non-VHE KVM namespace */

scripts/mksysmap

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,17 @@
4040
# 'W' or 'w'.
4141
#
4242
# Ignored prefixes:
43+
# $ - local symbols for ARM, MIPS, etc.
44+
# .L - local labels, .LBB,.Ltmpxxx,.L__unnamed_xx,.LASANPC, etc.
4345
# __crc_ - modversions
44-
$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)\|\( L0\)' > $2
46+
#
47+
# Ignored symbols:
48+
# L0 - for LoongArch?
49+
50+
$NM -n $1 | grep -v \
51+
-e ' [aNUw] ' \
52+
-e ' \$' \
53+
-e ' \.L' \
54+
-e ' __crc_' \
55+
-e ' L0$' \
56+
> $2

0 commit comments

Comments
 (0)