summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-24 01:04:41 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-25 21:06:14 +0900
commit887df76de67f5a6dd423e5763c22ff07f0e50048 (patch)
tree8687b31b7f6cb6348db646cef58900a88d82ff6b
parent97261e1e2240f627e27e93f7e410be1a7c97c80a (diff)
downloadlinux-rt-887df76de67f5a6dd423e5763c22ff07f0e50048.tar.gz
scripts/kallsyms: move ignored symbol types to is_ignored_symbol()
Collect the ignored patterns to is_ignored_symbol(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--scripts/kallsyms.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 04a1dd16edcf..d90a6133d7b8 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -137,6 +137,21 @@ static bool is_ignored_symbol(const char *name, char type)
return true;
}
+ if (type == 'U' || type == 'u')
+ return true;
+ /* exclude debugging symbols */
+ if (type == 'N' || type == 'n')
+ return true;
+
+ if (toupper(type) == 'A') {
+ /* Keep these useful absolute symbols */
+ if (strcmp(name, "__kernel_syscall_via_break") &&
+ strcmp(name, "__kernel_syscall_via_epc") &&
+ strcmp(name, "__kernel_sigtramp") &&
+ strcmp(name, "__gp"))
+ return true;
+ }
+
return false;
}
@@ -188,21 +203,6 @@ static int read_symbol(FILE *in, struct sym_entry *s)
else if (check_symbol_range(sym, s->addr, text_ranges,
ARRAY_SIZE(text_ranges)) == 0)
/* nothing to do */;
- else if (toupper(stype) == 'A')
- {
- /* Keep these useful absolute symbols */
- if (strcmp(sym, "__kernel_syscall_via_break") &&
- strcmp(sym, "__kernel_syscall_via_epc") &&
- strcmp(sym, "__kernel_sigtramp") &&
- strcmp(sym, "__gp"))
- return -1;
-
- }
- else if (toupper(stype) == 'U')
- return -1;
- /* exclude debugging symbols */
- else if (stype == 'N' || stype == 'n')
- return -1;
/* include the type field in the symbol name, so that it gets
* compressed together */