Lines Matching refs:plt
31 static void prealloc_fixed(struct mod_plt_sec *pltsec, struct plt_entries *plt) in prealloc_fixed() argument
39 for (i = 0; i < ARRAY_SIZE(plt->ldr); ++i) in prealloc_fixed()
40 plt->ldr[i] = PLT_ENT_LDR; in prealloc_fixed()
42 BUILD_BUG_ON(sizeof(fixed_plts) > sizeof(plt->lit)); in prealloc_fixed()
43 memcpy(plt->lit, fixed_plts, sizeof(fixed_plts)); in prealloc_fixed()
50 struct plt_entries *plt; in get_module_plt() local
55 pltsec->plt_ent = (struct plt_entries *)pltsec->plt->sh_addr; in get_module_plt()
56 plt = pltsec->plt_ent; in get_module_plt()
58 prealloc_fixed(pltsec, plt); in get_module_plt()
61 if (plt->lit[idx] == val) in get_module_plt()
62 return (u32)&plt->ldr[idx]; in get_module_plt()
71 plt += (pltsec->plt_count - 1) / PLT_ENT_COUNT; in get_module_plt()
74 if (plt->lit[idx] == val) in get_module_plt()
75 return (u32)&plt->ldr[idx]; in get_module_plt()
79 plt++; in get_module_plt()
83 BUG_ON(pltsec->plt_count * PLT_ENT_SIZE > pltsec->plt->sh_size); in get_module_plt()
87 *plt = (struct plt_entries){ in get_module_plt()
92 plt->lit[idx] = val; in get_module_plt()
94 return (u32)&plt->ldr[idx]; in get_module_plt()
223 mod->arch.core.plt = s; in module_frob_arch_sections()
225 mod->arch.init.plt = s; in module_frob_arch_sections()
230 if (!mod->arch.core.plt || !mod->arch.init.plt) { in module_frob_arch_sections()
262 mod->arch.core.plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
263 mod->arch.core.plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
264 mod->arch.core.plt->sh_addralign = L1_CACHE_BYTES; in module_frob_arch_sections()
265 mod->arch.core.plt->sh_size = round_up(core_plts * PLT_ENT_SIZE, in module_frob_arch_sections()
270 mod->arch.init.plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
271 mod->arch.init.plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
272 mod->arch.init.plt->sh_addralign = L1_CACHE_BYTES; in module_frob_arch_sections()
273 mod->arch.init.plt->sh_size = round_up(init_plts * PLT_ENT_SIZE, in module_frob_arch_sections()
279 mod->arch.core.plt->sh_size, mod->arch.init.plt->sh_size); in module_frob_arch_sections()