diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2023-03-31 11:15:52 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-14 02:15:49 +0200 |
commit | 987d2e0aaa55de40938435be760aa96428470fd6 (patch) | |
tree | b052bab286905e58d71f35bd0c059b966ff7d0df /kernel/module/kallsyms.c | |
parent | module: Sync code of is_arm_mapping_symbol() (diff) | |
download | linux-987d2e0aaa55de40938435be760aa96428470fd6.tar.xz linux-987d2e0aaa55de40938435be760aa96428470fd6.zip |
module: Move is_arm_mapping_symbol() to module_symbol.h
In order to avoid duplicated code, move is_arm_mapping_symbol() to
include/linux/module_symbol.h, then remove is_arm_mapping_symbol()
in the other places.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/kallsyms.c')
-rw-r--r-- | kernel/module/kallsyms.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/kernel/module/kallsyms.c b/kernel/module/kallsyms.c index a9045fe55bcd..5de3207f18af 100644 --- a/kernel/module/kallsyms.c +++ b/kernel/module/kallsyms.c @@ -6,6 +6,7 @@ */ #include <linux/module.h> +#include <linux/module_symbol.h> #include <linux/kallsyms.h> #include <linux/buildid.h> #include <linux/bsearch.h> @@ -243,19 +244,6 @@ void init_build_id(struct module *mod, const struct load_info *info) } #endif -/* - * This ignores the intensely annoying "mapping symbols" found - * in ARM ELF files: $a, $t and $d. - */ -static inline int is_arm_mapping_symbol(const char *str) -{ - if (str[0] == '.' && str[1] == 'L') - return true; - return str[0] == '$' && - (str[1] == 'a' || str[1] == 'd' || str[1] == 't' || str[1] == 'x') - && (str[2] == '\0' || str[2] == '.'); -} - static const char *kallsyms_symbol_name(struct mod_kallsyms *kallsyms, unsigned int symnum) { return kallsyms->strtab + kallsyms->symtab[symnum].st_name; |