Lines Matching full:location
46 static int apply_r_larch_none(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_none() argument
52 static int apply_r_larch_error(struct module *me, u32 *location, Elf_Addr v, in apply_r_larch_error() argument
59 static int apply_r_larch_32(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_32() argument
62 *location = v; in apply_r_larch_32()
66 static int apply_r_larch_64(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_64() argument
69 *(Elf_Addr *)location = v; in apply_r_larch_64()
73 static int apply_r_larch_sop_push_pcrel(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_sop_push_pcrel() argument
76 return rela_stack_push(v - (u64)location, rela_stack, rela_stack_top); in apply_r_larch_sop_push_pcrel()
79 static int apply_r_larch_sop_push_absolute(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_sop_push_absolute() argument
85 static int apply_r_larch_sop_push_dup(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_sop_push_dup() argument
105 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, in apply_r_larch_sop_push_plt_pcrel() argument
108 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_larch_sop_push_plt_pcrel()
116 return apply_r_larch_sop_push_pcrel(mod, location, v, rela_stack, rela_stack_top, type); in apply_r_larch_sop_push_plt_pcrel()
119 static int apply_r_larch_sop(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_sop() argument
165 static int apply_r_larch_sop_imm_field(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_sop_imm_field() argument
170 union loongarch_instruction *insn = (union loongarch_instruction *)location; in apply_r_larch_sop_imm_field()
238 *location = (u32)opr1; in apply_r_larch_sop_imm_field()
256 static int apply_r_larch_add_sub(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_add_sub() argument
261 *(s32 *)location += v; in apply_r_larch_add_sub()
264 *(s64 *)location += v; in apply_r_larch_add_sub()
267 *(s32 *)location -= v; in apply_r_larch_add_sub()
270 *(s64 *)location -= v; in apply_r_larch_add_sub()
279 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, in apply_r_larch_b26() argument
282 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_larch_b26()
283 union loongarch_instruction *insn = (union loongarch_instruction *)location; in apply_r_larch_b26()
291 offset = (void *)v - (void *)location; in apply_r_larch_b26()
312 static int apply_r_larch_pcala(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_pcala() argument
315 union loongarch_instruction *insn = (union loongarch_instruction *)location; in apply_r_larch_pcala()
318 (void *)((Elf_Addr)location & ~0xfff); in apply_r_larch_pcala()
319 Elf_Addr anchor = (((Elf_Addr)location) & ~0xfff) + offset_hi20; in apply_r_larch_pcala()
347 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, in apply_r_larch_got_pc() argument
367 return apply_r_larch_pcala(mod, location, got, rela_stack, rela_stack_top, type); in apply_r_larch_got_pc()
370 static int apply_r_larch_32_pcrel(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_32_pcrel() argument
373 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_larch_32_pcrel()
375 *(u32 *)location = offset; in apply_r_larch_32_pcrel()
379 static int apply_r_larch_64_pcrel(struct module *mod, u32 *location, Elf_Addr v, in apply_r_larch_64_pcrel() argument
382 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_larch_64_pcrel()
384 *(u64 *)location = offset; in apply_r_larch_64_pcrel()
391 * @location: the address at which the reloc is to be applied
398 typedef int (*reloc_rela_handler)(struct module *mod, u32 *location, Elf_Addr v,
430 void *location; in apply_relocate_add() local
441 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr + rel[i].r_offset; in apply_relocate_add()
466 sym->st_value, rel[i].r_addend, (u64)location); in apply_relocate_add()
471 err = apply_r_larch_b26(mod, sechdrs, location, in apply_relocate_add()
475 err = apply_r_larch_got_pc(mod, sechdrs, location, in apply_relocate_add()
479 err = apply_r_larch_sop_push_plt_pcrel(mod, sechdrs, location, in apply_relocate_add()
483 err = handler(mod, location, v, rela_stack, &rela_stack_top, type); in apply_relocate_add()