Lines Matching +full:12 +full:v

16 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)  in apply_r_riscv_32_rela()  argument
18 if (v != (u32)v) { in apply_r_riscv_32_rela()
20 me->name, (long long)v); in apply_r_riscv_32_rela()
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()
34 Elf_Addr v) in apply_r_riscv_branch_rela() argument
36 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
37 u32 imm12 = (offset & 0x1000) << (31 - 12); in apply_r_riscv_branch_rela()
47 Elf_Addr v) in apply_r_riscv_jal_rela() argument
49 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
60 Elf_Addr v) in apply_r_riscv_rcv_branch_rela() argument
62 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rcv_branch_rela()
63 u16 imm8 = (offset & 0x100) << (12 - 8); in apply_r_riscv_rcv_branch_rela()
66 u16 imm4_3 = (offset & 0x18) << (12 - 5); in apply_r_riscv_rcv_branch_rela()
67 u16 imm2_1 = (offset & 0x6) << (12 - 10); in apply_r_riscv_rcv_branch_rela()
75 Elf_Addr v) in apply_r_riscv_rvc_jump_rela() argument
77 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
78 u16 imm11 = (offset & 0x800) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
80 u16 imm9_8 = (offset & 0x300) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
82 u16 imm6 = (offset & 0x40) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
84 u16 imm4 = (offset & 0x10) << (12 - 5); in apply_r_riscv_rvc_jump_rela()
85 u16 imm3_1 = (offset & 0xe) << (12 - 10); in apply_r_riscv_rvc_jump_rela()
93 Elf_Addr v) 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()
111 Elf_Addr v) in apply_r_riscv_pcrel_lo12_i_rela() argument
114 * v is the lo12 value to fill. It is calculated before calling this in apply_r_riscv_pcrel_lo12_i_rela()
117 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
122 Elf_Addr v) in apply_r_riscv_pcrel_lo12_s_rela() argument
125 * v is the lo12 value to fill. It is calculated before calling this in apply_r_riscv_pcrel_lo12_s_rela()
128 u32 imm11_5 = (v & 0xfe0) << (31 - 11); in apply_r_riscv_pcrel_lo12_s_rela()
129 u32 imm4_0 = (v & 0x1f) << (11 - 4); in apply_r_riscv_pcrel_lo12_s_rela()
136 Elf_Addr v) in apply_r_riscv_hi20_rela() argument
143 me->name, (long long)v, location); in apply_r_riscv_hi20_rela()
147 hi20 = ((s32)v + 0x800) & 0xfffff000; in apply_r_riscv_hi20_rela()
153 Elf_Addr v) in apply_r_riscv_lo12_i_rela() argument
156 s32 hi20 = ((s32)v + 0x800) & 0xfffff000; in apply_r_riscv_lo12_i_rela()
157 s32 lo12 = ((s32)v - hi20); in apply_r_riscv_lo12_i_rela()
163 Elf_Addr v) in apply_r_riscv_lo12_s_rela() argument
166 s32 hi20 = ((s32)v + 0x800) & 0xfffff000; in apply_r_riscv_lo12_s_rela()
167 s32 lo12 = ((s32)v - hi20); in apply_r_riscv_lo12_s_rela()
175 Elf_Addr v) in apply_r_riscv_got_hi20_rela() argument
177 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
182 offset = module_emit_got_entry(me, v); in apply_r_riscv_got_hi20_rela()
187 me->name, (long long)v, location); in apply_r_riscv_got_hi20_rela()
197 Elf_Addr v) in apply_r_riscv_call_plt_rela() argument
199 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
206 offset = module_emit_plt_entry(me, v); in apply_r_riscv_call_plt_rela()
211 me->name, (long long)v, location); in apply_r_riscv_call_plt_rela()
224 Elf_Addr v) 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()
245 Elf_Addr v) in apply_r_riscv_relax_rela() argument
251 Elf_Addr v) in apply_r_riscv_align_rela() argument
260 Elf_Addr v) in apply_r_riscv_add32_rela() argument
262 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
267 Elf_Addr v) in apply_r_riscv_add64_rela() argument
269 *(u64 *)location += (u64)v; in apply_r_riscv_add64_rela()
274 Elf_Addr v) in apply_r_riscv_sub32_rela() argument
276 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
281 Elf_Addr v) in apply_r_riscv_sub64_rela() argument
283 *(u64 *)location -= (u64)v; in apply_r_riscv_sub64_rela()
288 Elf_Addr v) = {
317 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
321 Elf_Addr v; in apply_relocate_add() local
356 v = sym->st_value + rel[i].r_addend; in apply_relocate_add()
389 v = lo12; in apply_relocate_add()
402 res = handler(me, location, v); in apply_relocate_add()