Commit 97261e1e authored by Masahiro Yamada's avatar Masahiro Yamada

scripts/kallsyms: move more patterns to the ignored_prefixes array

Refactoring for shortening the code.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent a41333e0
...@@ -105,6 +105,8 @@ static bool is_ignored_symbol(const char *name, char type) ...@@ -105,6 +105,8 @@ static bool is_ignored_symbol(const char *name, char type)
}; };
static const char * const ignored_prefixes[] = { static const char * const ignored_prefixes[] = {
"$", /* local symbols for ARM, MIPS, etc. */
".LASANPC", /* s390 kasan local symbols */
"__crc_", /* modversions */ "__crc_", /* modversions */
"__efistub_", /* arm64 EFI stub namespace */ "__efistub_", /* arm64 EFI stub namespace */
NULL NULL
...@@ -198,19 +200,9 @@ static int read_symbol(FILE *in, struct sym_entry *s) ...@@ -198,19 +200,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
} }
else if (toupper(stype) == 'U') else if (toupper(stype) == 'U')
return -1; return -1;
/*
* Ignore generated symbols such as:
* - mapping symbols in ARM ELF files ($a, $t, and $d)
* - MIPS ELF local symbols ($L123 instead of .L123)
*/
else if (sym[0] == '$')
return -1;
/* exclude debugging symbols */ /* exclude debugging symbols */
else if (stype == 'N' || stype == 'n') else if (stype == 'N' || stype == 'n')
return -1; return -1;
/* exclude s390 kasan local symbols */
else if (!strncmp(sym, ".LASANPC", 8))
return -1;
/* include the type field in the symbol name, so that it gets /* include the type field in the symbol name, so that it gets
* compressed together */ * compressed together */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment