--- zzzz-none-000/linux-4.4.271/arch/arm/kernel/module-plts.c 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/arch/arm/kernel/module-plts.c 2023-04-19 10:22:27.000000000 +0000 @@ -13,6 +13,8 @@ #include #include +#include + #define PLT_ENT_STRIDE L1_CACHE_BYTES #define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32)) #define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT) @@ -164,6 +166,11 @@ core_plts += count_plts(dstsec->sh_addr, rels, numrels); } + if (avm_module_is_allowed(mod->name)) { + pr_debug("[%s] no plts needed for core of module %s\n", __func__, mod->name); + core_plts = 0; + } + mod->arch.core_plt->sh_type = SHT_NOBITS; mod->arch.core_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; mod->arch.core_plt->sh_addralign = L1_CACHE_BYTES;