diff --git a/kernel/module.c b/kernel/module.c index be3b4356e5f8..6416fe1a5130 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2570,15 +2570,21 @@ static bool is_core_symbol(const Elf_Sym *src, const Elf_Shdr *sechdrs, || !src->st_name) return false; +#ifndef CONFIG_AMLOGIC_MODIFY #ifdef CONFIG_KALLSYMS_ALL if (src->st_shndx == pcpundx) return true; #endif +#endif /* ignore all symbols of moulde been loaded */ sec = sechdrs + src->st_shndx; if (!(sec->sh_flags & SHF_ALLOC) +#ifdef CONFIG_AMLOGIC_MODIFY + || !(sec->sh_flags & SHF_EXECINSTR) +#else #ifndef CONFIG_KALLSYMS_ALL || !(sec->sh_flags & SHF_EXECINSTR) +#endif #endif || (sec->sh_entsize & INIT_OFFSET_MASK)) return false;