Lines Matching refs:plt

36 static void prealloc_fixed(struct mod_plt_sec *pltsec, struct plt_entries *plt)  in prealloc_fixed()  argument
44 for (i = 0; i < ARRAY_SIZE(plt->ldr); ++i) in prealloc_fixed()
45 plt->ldr[i] = PLT_ENT_LDR; in prealloc_fixed()
47 BUILD_BUG_ON(sizeof(fixed_plts) > sizeof(plt->lit)); in prealloc_fixed()
48 memcpy(plt->lit, fixed_plts, sizeof(fixed_plts)); in prealloc_fixed()
55 struct plt_entries *plt; in get_module_plt() local
60 pltsec->plt_ent = (struct plt_entries *)pltsec->plt->sh_addr; in get_module_plt()
61 plt = pltsec->plt_ent; in get_module_plt()
63 prealloc_fixed(pltsec, plt); in get_module_plt()
66 if (plt->lit[idx] == val) in get_module_plt()
67 return (u32)&plt->ldr[idx]; in get_module_plt()
76 plt += (pltsec->plt_count - 1) / PLT_ENT_COUNT; in get_module_plt()
79 if (plt->lit[idx] == val) in get_module_plt()
80 return (u32)&plt->ldr[idx]; in get_module_plt()
84 plt++; in get_module_plt()
88 BUG_ON(pltsec->plt_count * PLT_ENT_SIZE > pltsec->plt->sh_size); in get_module_plt()
92 *plt = (struct plt_entries){ in get_module_plt()
97 plt->lit[idx] = val; in get_module_plt()
99 return (u32)&plt->ldr[idx]; in get_module_plt()
228 mod->arch.core.plt = s; in module_frob_arch_sections()
230 mod->arch.init.plt = s; in module_frob_arch_sections()
235 if (!mod->arch.core.plt || !mod->arch.init.plt) { in module_frob_arch_sections()
267 mod->arch.core.plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
268 mod->arch.core.plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
269 mod->arch.core.plt->sh_addralign = L1_CACHE_BYTES; in module_frob_arch_sections()
270 mod->arch.core.plt->sh_size = round_up(core_plts * PLT_ENT_SIZE, in module_frob_arch_sections()
275 mod->arch.init.plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
276 mod->arch.init.plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
277 mod->arch.init.plt->sh_addralign = L1_CACHE_BYTES; in module_frob_arch_sections()
278 mod->arch.init.plt->sh_size = round_up(init_plts * PLT_ENT_SIZE, in module_frob_arch_sections()
284 mod->arch.core.plt->sh_size, mod->arch.init.plt->sh_size); in module_frob_arch_sections()