Lines Matching refs:location

20 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)  in apply_r_riscv_32_rela()  argument
27 *location = v; in apply_r_riscv_32_rela()
31 static int apply_r_riscv_64_rela(struct module *me, u32 *location, Elf_Addr v) in apply_r_riscv_64_rela() argument
33 *(u64 *)location = v; in apply_r_riscv_64_rela()
37 static int apply_r_riscv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_branch_rela() argument
40 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
46 *location = (*location & 0x1fff07f) | imm12 | imm11 | imm10_5 | imm4_1; in apply_r_riscv_branch_rela()
50 static int apply_r_riscv_jal_rela(struct module *me, u32 *location, in apply_r_riscv_jal_rela() argument
53 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
59 *location = (*location & 0xfff) | imm20 | imm19_12 | imm11 | imm10_1; in apply_r_riscv_jal_rela()
63 static int apply_r_riscv_rcv_branch_rela(struct module *me, u32 *location, in apply_r_riscv_rcv_branch_rela() argument
66 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rcv_branch_rela()
73 *(u16 *)location = (*(u16 *)location & 0xe383) | in apply_r_riscv_rcv_branch_rela()
78 static int apply_r_riscv_rvc_jump_rela(struct module *me, u32 *location, in apply_r_riscv_rvc_jump_rela() argument
81 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
91 *(u16 *)location = (*(u16 *)location & 0xe003) | in apply_r_riscv_rvc_jump_rela()
96 static int apply_r_riscv_pcrel_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_hi20_rela() argument
99 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_pcrel_hi20_rela()
105 me->name, v, location); in apply_r_riscv_pcrel_hi20_rela()
110 *location = (*location & 0xfff) | hi20; in apply_r_riscv_pcrel_hi20_rela()
114 static int apply_r_riscv_pcrel_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_i_rela() argument
121 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
125 static int apply_r_riscv_pcrel_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_pcrel_lo12_s_rela() argument
135 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_pcrel_lo12_s_rela()
139 static int apply_r_riscv_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_hi20_rela() argument
147 me->name, v, location); in apply_r_riscv_hi20_rela()
152 *location = (*location & 0xfff) | hi20; in apply_r_riscv_hi20_rela()
156 static int apply_r_riscv_lo12_i_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_i_rela() argument
162 *location = (*location & 0xfffff) | ((lo12 & 0xfff) << 20); in apply_r_riscv_lo12_i_rela()
166 static int apply_r_riscv_lo12_s_rela(struct module *me, u32 *location, in apply_r_riscv_lo12_s_rela() argument
174 *location = (*location & 0x1fff07f) | imm11_5 | imm4_0; in apply_r_riscv_lo12_s_rela()
178 static int apply_r_riscv_got_hi20_rela(struct module *me, u32 *location, in apply_r_riscv_got_hi20_rela() argument
181 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
187 offset = (void *)offset - (void *)location; in apply_r_riscv_got_hi20_rela()
191 me->name, v, location); in apply_r_riscv_got_hi20_rela()
196 *location = (*location & 0xfff) | hi20; in apply_r_riscv_got_hi20_rela()
200 static int apply_r_riscv_call_plt_rela(struct module *me, u32 *location, in apply_r_riscv_call_plt_rela() argument
203 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
211 offset = (void *)offset - (void *)location; in apply_r_riscv_call_plt_rela()
215 me->name, v, location); in apply_r_riscv_call_plt_rela()
222 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_plt_rela()
223 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_plt_rela()
227 static int apply_r_riscv_call_rela(struct module *me, u32 *location, in apply_r_riscv_call_rela() argument
230 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_rela()
237 me->name, v, location); in apply_r_riscv_call_rela()
243 *location = (*location & 0xfff) | hi20; in apply_r_riscv_call_rela()
244 *(location + 1) = (*(location + 1) & 0xfffff) | (lo12 << 20); in apply_r_riscv_call_rela()
248 static int apply_r_riscv_relax_rela(struct module *me, u32 *location, in apply_r_riscv_relax_rela() argument
254 static int apply_r_riscv_align_rela(struct module *me, u32 *location, in apply_r_riscv_align_rela() argument
259 me->name, location); in apply_r_riscv_align_rela()
263 static int apply_r_riscv_add32_rela(struct module *me, u32 *location, in apply_r_riscv_add32_rela() argument
266 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
270 static int apply_r_riscv_sub32_rela(struct module *me, u32 *location, in apply_r_riscv_sub32_rela() argument
273 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
277 static int (*reloc_handlers_rela[]) (struct module *me, u32 *location,
305 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
307 u32 *location; in apply_relocate_add() local
317 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
390 res = handler(me, location, v); in apply_relocate_add()