Lines Matching full:location
24 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_32_rela() argument
31 *location = v; in apply_r_riscv_32_rela()
35 static int apply_r_riscv_64_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_64_rela() argument
37 *(u64 *)location = v; in apply_r_riscv_64_rela()
41 static int apply_r_riscv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_branch_rela() argument
44 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
50 *location = (*location & 0x1fff07f) | imm12 | imm11 | imm10_5 | imm4_1; in apply_r_riscv_branch_rela()
54 static int apply_r_riscv_jal_rela(struct module *me, u32 *location, in apply_r_riscv_jal_rela() argument
57 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
63 *location = (*location & 0xfff) | imm20 | imm19_12 | imm11 | imm10_1; in apply_r_riscv_jal_rela()
67 static int apply_r_riscv_rcv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_rcv_branch_rela() argument
70 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rcv_branch_rela()
77 *(u16 *)location = (*(u16 *)location & 0xe383) | in apply_r_riscv_rcv_branch_rela()
82 static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location, in apply_r_riscv_rvc_jump_rela() argument
85 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
95 *(u16 *)location = (*(u16 *)location & 0xe003) | in apply_r_riscv_rvc_jump_rela()
100 static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_hi20_rela() argument
103 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_pcrel_hi20_rela()
109 me->name, (long long)v, location); in apply_r_riscv_pcrel_hi20_rela()
114 *location = (*location & 0xfff) | hi20; in apply_r_riscv_pcrel_hi20_rela()
118 static int apply_r_riscv_pcrel_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_i_rela() argument
125 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
129 static int apply_r_riscv_pcrel_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_s_rela() argument
139 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_pcrel_lo12_s_rela()
143 static int apply_r_riscv_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_hi20_rela() argument
151 me->name, (long long)v, location); in apply_r_riscv_hi20_rela()
156 *location = (*location & 0xfff) | hi20; in apply_r_riscv_hi20_rela()
160 static int apply_r_riscv_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_i_rela() argument
166 *location = (*location & 0xfffff) | ((lo12 & 0xfff) << 20); in apply_r_riscv_lo12_i_rela()
170 static int apply_r_riscv_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_s_rela() argument
178 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_lo12_s_rela()
182 static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_got_hi20_rela() argument
185 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
191 offset = (void *)offset - (void *)location; in apply_r_riscv_got_hi20_rela()
195 me->name, (long long)v, location); in apply_r_riscv_got_hi20_rela()
200 *location = (*location & 0xfff) | hi20; in apply_r_riscv_got_hi20_rela()
204 static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location, in apply_r_riscv_call_plt_rela() argument
207 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
215 offset = (void *)offset - (void *)location; in apply_r_riscv_call_plt_rela()
219 me->name, (long long)v, location); in apply_r_riscv_call_plt_rela()
226 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_plt_rela()
227 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_plt_rela()
231 static int apply_r_riscv_call_rela(struct module *me, u32 *location, in apply_r_riscv_call_rela() argument
234 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_rela()
241 me->name, (long long)v, location); in apply_r_riscv_call_rela()
247 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_rela()
248 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_rela()
252 static int apply_r_riscv_relax_rela(struct module *me, u32 *location, in apply_r_riscv_relax_rela() argument
258 static int apply_r_riscv_align_rela(struct module *me, u32 *location, in apply_r_riscv_align_rela() argument
263 me->name, location); in apply_r_riscv_align_rela()
267 static int apply_r_riscv_add32_rela(struct module *me, u32 *location, in apply_r_riscv_add32_rela() argument
270 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
274 static int apply_r_riscv_sub32_rela(struct module *me, u32 *location, in apply_r_riscv_sub32_rela() argument
277 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
281 static int (*reloc_handlers_rela[]) (struct module *me, u32 *location,
309 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
311 u32 *location; in apply_relocate_add() local
321 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
394 res = handler(me, location, v); in apply_relocate_add()