Skip to content

Commit 97261e1

Browse files
committed
scripts/kallsyms: move more patterns to the ignored_prefixes array
Refactoring for shortening the code. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent a41333e commit 97261e1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

scripts/kallsyms.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ static bool is_ignored_symbol(const char *name, char type)
105105
};
106106

107107
static const char * const ignored_prefixes[] = {
108+
"$", /* local symbols for ARM, MIPS, etc. */
109+
".LASANPC", /* s390 kasan local symbols */
108110
"__crc_", /* modversions */
109111
"__efistub_", /* arm64 EFI stub namespace */
110112
NULL
@@ -198,19 +200,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
198200
}
199201
else if (toupper(stype) == 'U')
200202
return -1;
201-
/*
202-
* Ignore generated symbols such as:
203-
* - mapping symbols in ARM ELF files ($a, $t, and $d)
204-
* - MIPS ELF local symbols ($L123 instead of .L123)
205-
*/
206-
else if (sym[0] == '$')
207-
return -1;
208203
/* exclude debugging symbols */
209204
else if (stype == 'N' || stype == 'n')
210205
return -1;
211-
/* exclude s390 kasan local symbols */
212-
else if (!strncmp(sym, ".LASANPC", 8))
213-
return -1;
214206

215207
/* include the type field in the symbol name, so that it gets
216208
* compressed together */

0 commit comments

Comments
 (0)