Lines Matching refs:location

30 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)  in apply_r_riscv_32_rela()  argument
37 *location = v; in apply_r_riscv_32_rela()
41 static int apply_r_riscv_64_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_64_rela() argument
43 *(u64 *)location = v; in apply_r_riscv_64_rela()
47 static int apply_r_riscv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_branch_rela() argument
50 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
56 *location = (*location & 0x1fff07f) | imm12 | imm11 | imm10_5 | imm4_1; in apply_r_riscv_branch_rela()
60 static int apply_r_riscv_jal_rela(struct module *me, u32 *location, in apply_r_riscv_jal_rela() argument
63 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
69 *location = (*location & 0xfff) | imm20 | imm19_12 | imm11 | imm10_1; in apply_r_riscv_jal_rela()
73 static int apply_r_riscv_rvc_branch_rela(struct module *me, u32 *location, in apply_r_riscv_rvc_branch_rela() argument
76 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_branch_rela()
83 *(u16 *)location = (*(u16 *)location & 0xe383) | in apply_r_riscv_rvc_branch_rela()
88 static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location, in apply_r_riscv_rvc_jump_rela() argument
91 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
101 *(u16 *)location = (*(u16 *)location & 0xe003) | in apply_r_riscv_rvc_jump_rela()
106 static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_hi20_rela() argument
109 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_pcrel_hi20_rela()
115 me->name, (long long)v, location); in apply_r_riscv_pcrel_hi20_rela()
120 *location = (*location & 0xfff) | hi20; in apply_r_riscv_pcrel_hi20_rela()
124 static int apply_r_riscv_pcrel_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_i_rela() argument
131 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
135 static int apply_r_riscv_pcrel_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_s_rela() argument
145 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_pcrel_lo12_s_rela()
149 static int apply_r_riscv_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_hi20_rela() argument
157 me->name, (long long)v, location); in apply_r_riscv_hi20_rela()
162 *location = (*location & 0xfff) | hi20; in apply_r_riscv_hi20_rela()
166 static int apply_r_riscv_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_i_rela() argument
172 *location = (*location & 0xfffff) | ((lo12 & 0xfff) << 20); in apply_r_riscv_lo12_i_rela()
176 static int apply_r_riscv_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_s_rela() argument
184 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_lo12_s_rela()
188 static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_got_hi20_rela() argument
191 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
197 offset = (void *)offset - (void *)location; in apply_r_riscv_got_hi20_rela()
201 me->name, (long long)v, location); in apply_r_riscv_got_hi20_rela()
206 *location = (*location & 0xfff) | hi20; in apply_r_riscv_got_hi20_rela()
210 static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location, in apply_r_riscv_call_plt_rela() argument
213 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
220 offset = (void *)offset - (void *)location; in apply_r_riscv_call_plt_rela()
224 me->name, (long long)v, location); in apply_r_riscv_call_plt_rela()
231 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_plt_rela()
232 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_plt_rela()
236 static int apply_r_riscv_call_rela(struct module *me, u32 *location, in apply_r_riscv_call_rela() argument
239 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_rela()
245 me->name, (long long)v, location); in apply_r_riscv_call_rela()
251 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_rela()
252 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_rela()
256 static int apply_r_riscv_relax_rela(struct module *me, u32 *location, in apply_r_riscv_relax_rela() argument
262 static int apply_r_riscv_align_rela(struct module *me, u32 *location, in apply_r_riscv_align_rela() argument
267 me->name, location); in apply_r_riscv_align_rela()
271 static int apply_r_riscv_add32_rela(struct module *me, u32 *location, in apply_r_riscv_add32_rela() argument
274 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
278 static int apply_r_riscv_add64_rela(struct module *me, u32 *location, in apply_r_riscv_add64_rela() argument
281 *(u64 *)location += (u64)v; in apply_r_riscv_add64_rela()
285 static int apply_r_riscv_sub32_rela(struct module *me, u32 *location, in apply_r_riscv_sub32_rela() argument
288 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
292 static int apply_r_riscv_sub64_rela(struct module *me, u32 *location, in apply_r_riscv_sub64_rela() argument
295 *(u64 *)location -= (u64)v; in apply_r_riscv_sub64_rela()
299 static int (*reloc_handlers_rela[]) (struct module *me, u32 *location,
329 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
331 u32 *location; in apply_relocate_add() local
341 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
414 res = handler(me, location, v); in apply_relocate_add()