Lines Matching full:location
29 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_32_rela() argument
36 *location = v; in apply_r_riscv_32_rela()
40 static int apply_r_riscv_64_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_64_rela() argument
42 *(u64 *)location = v; in apply_r_riscv_64_rela()
46 static int apply_r_riscv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_branch_rela() argument
49 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
55 *location = (*location & 0x1fff07f) | imm12 | imm11 | imm10_5 | imm4_1; in apply_r_riscv_branch_rela()
59 static int apply_r_riscv_jal_rela(struct module *me, u32 *location, in apply_r_riscv_jal_rela() argument
62 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
68 *location = (*location & 0xfff) | imm20 | imm19_12 | imm11 | imm10_1; in apply_r_riscv_jal_rela()
72 static int apply_r_riscv_rcv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_rcv_branch_rela() argument
75 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rcv_branch_rela()
82 *(u16 *)location = (*(u16 *)location & 0xe383) | in apply_r_riscv_rcv_branch_rela()
87 static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location, in apply_r_riscv_rvc_jump_rela() argument
90 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
100 *(u16 *)location = (*(u16 *)location & 0xe003) | in apply_r_riscv_rvc_jump_rela()
105 static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_hi20_rela() argument
108 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_pcrel_hi20_rela()
114 me->name, (long long)v, location); in apply_r_riscv_pcrel_hi20_rela()
119 *location = (*location & 0xfff) | hi20; in apply_r_riscv_pcrel_hi20_rela()
123 static int apply_r_riscv_pcrel_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_i_rela() argument
130 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
134 static int apply_r_riscv_pcrel_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_s_rela() argument
144 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_pcrel_lo12_s_rela()
148 static int apply_r_riscv_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_hi20_rela() argument
156 me->name, (long long)v, location); in apply_r_riscv_hi20_rela()
161 *location = (*location & 0xfff) | hi20; in apply_r_riscv_hi20_rela()
165 static int apply_r_riscv_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_i_rela() argument
171 *location = (*location & 0xfffff) | ((lo12 & 0xfff) << 20); in apply_r_riscv_lo12_i_rela()
175 static int apply_r_riscv_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_s_rela() argument
183 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_lo12_s_rela()
187 static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_got_hi20_rela() argument
190 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
196 offset = (void *)offset - (void *)location; in apply_r_riscv_got_hi20_rela()
200 me->name, (long long)v, location); in apply_r_riscv_got_hi20_rela()
205 *location = (*location & 0xfff) | hi20; in apply_r_riscv_got_hi20_rela()
209 static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location, in apply_r_riscv_call_plt_rela() argument
212 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
219 offset = (void *)offset - (void *)location; in apply_r_riscv_call_plt_rela()
223 me->name, (long long)v, location); in apply_r_riscv_call_plt_rela()
230 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_plt_rela()
231 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_plt_rela()
235 static int apply_r_riscv_call_rela(struct module *me, u32 *location, in apply_r_riscv_call_rela() argument
238 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_rela()
244 me->name, (long long)v, location); in apply_r_riscv_call_rela()
250 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_rela()
251 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_rela()
255 static int apply_r_riscv_relax_rela(struct module *me, u32 *location, in apply_r_riscv_relax_rela() argument
261 static int apply_r_riscv_align_rela(struct module *me, u32 *location, in apply_r_riscv_align_rela() argument
266 me->name, location); in apply_r_riscv_align_rela()
270 static int apply_r_riscv_add32_rela(struct module *me, u32 *location, in apply_r_riscv_add32_rela() argument
273 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
277 static int apply_r_riscv_add64_rela(struct module *me, u32 *location, in apply_r_riscv_add64_rela() argument
280 *(u64 *)location += (u64)v; in apply_r_riscv_add64_rela()
284 static int apply_r_riscv_sub32_rela(struct module *me, u32 *location, in apply_r_riscv_sub32_rela() argument
287 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
291 static int apply_r_riscv_sub64_rela(struct module *me, u32 *location, in apply_r_riscv_sub64_rela() argument
294 *(u64 *)location -= (u64)v; in apply_r_riscv_sub64_rela()
298 static int (*reloc_handlers_rela[]) (struct module *me, u32 *location,
328 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
330 u32 *location; in apply_relocate_add() local
340 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
413 res = handler(me, location, v); in apply_relocate_add()