Lines Matching full:location
16 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_32_rela() argument
23 *location = v; in apply_r_riscv_32_rela()
27 static int apply_r_riscv_64_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_64_rela() argument
29 *(u64 *)location = v; in apply_r_riscv_64_rela()
33 static int apply_r_riscv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_branch_rela() argument
36 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
42 *location = (*location & 0x1fff07f) | imm12 | imm11 | imm10_5 | imm4_1; in apply_r_riscv_branch_rela()
46 static int apply_r_riscv_jal_rela(struct module *me, u32 *location, in apply_r_riscv_jal_rela() argument
49 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
55 *location = (*location & 0xfff) | imm20 | imm19_12 | imm11 | imm10_1; in apply_r_riscv_jal_rela()
59 static int apply_r_riscv_rcv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_rcv_branch_rela() argument
62 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rcv_branch_rela()
69 *(u16 *)location = (*(u16 *)location & 0xe383) | in apply_r_riscv_rcv_branch_rela()
74 static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location, in apply_r_riscv_rvc_jump_rela() argument
77 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
87 *(u16 *)location = (*(u16 *)location & 0xe003) | in apply_r_riscv_rvc_jump_rela()
92 static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_hi20_rela() argument
95 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_pcrel_hi20_rela()
101 me->name, (long long)v, location); in apply_r_riscv_pcrel_hi20_rela()
106 *location = (*location & 0xfff) | hi20; in apply_r_riscv_pcrel_hi20_rela()
110 static int apply_r_riscv_pcrel_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_i_rela() argument
117 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
121 static int apply_r_riscv_pcrel_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_s_rela() argument
131 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_pcrel_lo12_s_rela()
135 static int apply_r_riscv_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_hi20_rela() argument
143 me->name, (long long)v, location); in apply_r_riscv_hi20_rela()
148 *location = (*location & 0xfff) | hi20; in apply_r_riscv_hi20_rela()
152 static int apply_r_riscv_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_i_rela() argument
158 *location = (*location & 0xfffff) | ((lo12 & 0xfff) << 20); in apply_r_riscv_lo12_i_rela()
162 static int apply_r_riscv_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_s_rela() argument
170 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_lo12_s_rela()
174 static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_got_hi20_rela() argument
177 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
183 offset = (void *)offset - (void *)location; in apply_r_riscv_got_hi20_rela()
187 me->name, (long long)v, location); in apply_r_riscv_got_hi20_rela()
192 *location = (*location & 0xfff) | hi20; in apply_r_riscv_got_hi20_rela()
196 static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location, in apply_r_riscv_call_plt_rela() argument
199 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
207 offset = (void *)offset - (void *)location; in apply_r_riscv_call_plt_rela()
211 me->name, (long long)v, location); in apply_r_riscv_call_plt_rela()
218 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_plt_rela()
219 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_plt_rela()
223 static int apply_r_riscv_call_rela(struct module *me, u32 *location, in apply_r_riscv_call_rela() argument
226 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_rela()
233 me->name, (long long)v, location); in apply_r_riscv_call_rela()
239 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_rela()
240 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_rela()
244 static int apply_r_riscv_relax_rela(struct module *me, u32 *location, in apply_r_riscv_relax_rela() argument
250 static int apply_r_riscv_align_rela(struct module *me, u32 *location, in apply_r_riscv_align_rela() argument
255 me->name, location); in apply_r_riscv_align_rela()
259 static int apply_r_riscv_add32_rela(struct module *me, u32 *location, in apply_r_riscv_add32_rela() argument
262 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
266 static int apply_r_riscv_add64_rela(struct module *me, u32 *location, in apply_r_riscv_add64_rela() argument
269 *(u64 *)location += (u64)v; in apply_r_riscv_add64_rela()
273 static int apply_r_riscv_sub32_rela(struct module *me, u32 *location, in apply_r_riscv_sub32_rela() argument
276 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
280 static int apply_r_riscv_sub64_rela(struct module *me, u32 *location, in apply_r_riscv_sub64_rela() argument
283 *(u64 *)location -= (u64)v; in apply_r_riscv_sub64_rela()
287 static int (*reloc_handlers_rela[]) (struct module *me, u32 *location,
317 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
319 u32 *location; in apply_relocate_add() local
329 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
402 res = handler(me, location, v); in apply_relocate_add()