summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-23 19:04:40 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-25 15:06:01 +0300
commit97261e1e2240f627e27e93f7e410be1a7c97c80a (patch)
tree7e3aa1eeb9d40192ebf1a589181ffefcfa57487b /scripts
parenta41333e06acd1b37f3a3248fb90cd417218f9439 (diff)
downloadlinux-97261e1e2240f627e27e93f7e410be1a7c97c80a.tar.xz
scripts/kallsyms: move more patterns to the ignored_prefixes array
Refactoring for shortening the code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 843615c1d384..04a1dd16edcf 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -105,6 +105,8 @@ static bool is_ignored_symbol(const char *name, char type)
};
static const char * const ignored_prefixes[] = {
+ "$", /* local symbols for ARM, MIPS, etc. */
+ ".LASANPC", /* s390 kasan local symbols */
"__crc_", /* modversions */
"__efistub_", /* arm64 EFI stub namespace */
NULL
@@ -198,19 +200,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
}
else if (toupper(stype) == 'U')
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 */
else if (stype == 'N' || stype == 'n')
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
* compressed together */