Lines Matching +full:12 +full:v

30 static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)  in apply_r_riscv_32_rela()  argument
32 if (v != (u32)v) { in apply_r_riscv_32_rela()
34 me->name, (long long)v); in apply_r_riscv_32_rela()
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()
48 Elf_Addr v) in apply_r_riscv_branch_rela() argument
50 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela()
51 u32 imm12 = (offset & 0x1000) << (31 - 12); in apply_r_riscv_branch_rela()
61 Elf_Addr v) in apply_r_riscv_jal_rela() argument
63 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela()
74 Elf_Addr v) in apply_r_riscv_rvc_branch_rela() argument
76 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_branch_rela()
77 u16 imm8 = (offset & 0x100) << (12 - 8); in apply_r_riscv_rvc_branch_rela()
80 u16 imm4_3 = (offset & 0x18) << (12 - 5); in apply_r_riscv_rvc_branch_rela()
81 u16 imm2_1 = (offset & 0x6) << (12 - 10); in apply_r_riscv_rvc_branch_rela()
89 Elf_Addr v) in apply_r_riscv_rvc_jump_rela() argument
91 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela()
92 u16 imm11 = (offset & 0x800) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
94 u16 imm9_8 = (offset & 0x300) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
96 u16 imm6 = (offset & 0x40) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
98 u16 imm4 = (offset & 0x10) << (12 - 5); in apply_r_riscv_rvc_jump_rela()
99 u16 imm3_1 = (offset & 0xe) << (12 - 10); in apply_r_riscv_rvc_jump_rela()
107 Elf_Addr v) 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()
125 Elf_Addr v) in apply_r_riscv_pcrel_lo12_i_rela() argument
128 * v is the lo12 value to fill. It is calculated before calling this in apply_r_riscv_pcrel_lo12_i_rela()
131 *location = (*location & 0xfffff) | ((v & 0xfff) << 20); in apply_r_riscv_pcrel_lo12_i_rela()
136 Elf_Addr v) in apply_r_riscv_pcrel_lo12_s_rela() argument
139 * v is the lo12 value to fill. It is calculated before calling this in apply_r_riscv_pcrel_lo12_s_rela()
142 u32 imm11_5 = (v & 0xfe0) << (31 - 11); in apply_r_riscv_pcrel_lo12_s_rela()
143 u32 imm4_0 = (v & 0x1f) << (11 - 4); in apply_r_riscv_pcrel_lo12_s_rela()
150 Elf_Addr v) in apply_r_riscv_hi20_rela() argument
157 me->name, (long long)v, location); in apply_r_riscv_hi20_rela()
161 hi20 = ((s32)v + 0x800) & 0xfffff000; in apply_r_riscv_hi20_rela()
167 Elf_Addr v) in apply_r_riscv_lo12_i_rela() argument
170 s32 hi20 = ((s32)v + 0x800) & 0xfffff000; in apply_r_riscv_lo12_i_rela()
171 s32 lo12 = ((s32)v - hi20); in apply_r_riscv_lo12_i_rela()
177 Elf_Addr v) in apply_r_riscv_lo12_s_rela() argument
180 s32 hi20 = ((s32)v + 0x800) & 0xfffff000; in apply_r_riscv_lo12_s_rela()
181 s32 lo12 = ((s32)v - hi20); in apply_r_riscv_lo12_s_rela()
189 Elf_Addr v) in apply_r_riscv_got_hi20_rela() argument
191 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela()
196 offset = module_emit_got_entry(me, v); in apply_r_riscv_got_hi20_rela()
201 me->name, (long long)v, location); in apply_r_riscv_got_hi20_rela()
211 Elf_Addr v) in apply_r_riscv_call_plt_rela() argument
213 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela()
219 offset = module_emit_plt_entry(me, v); in apply_r_riscv_call_plt_rela()
224 me->name, (long long)v, location); in apply_r_riscv_call_plt_rela()
237 Elf_Addr v) 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()
257 Elf_Addr v) in apply_r_riscv_relax_rela() argument
263 Elf_Addr v) in apply_r_riscv_align_rela() argument
272 Elf_Addr v) in apply_r_riscv_add16_rela() argument
274 *(u16 *)location += (u16)v; in apply_r_riscv_add16_rela()
279 Elf_Addr v) in apply_r_riscv_add32_rela() argument
281 *(u32 *)location += (u32)v; in apply_r_riscv_add32_rela()
286 Elf_Addr v) in apply_r_riscv_add64_rela() argument
288 *(u64 *)location += (u64)v; in apply_r_riscv_add64_rela()
293 Elf_Addr v) in apply_r_riscv_sub16_rela() argument
295 *(u16 *)location -= (u16)v; in apply_r_riscv_sub16_rela()
300 Elf_Addr v) in apply_r_riscv_sub32_rela() argument
302 *(u32 *)location -= (u32)v; in apply_r_riscv_sub32_rela()
307 Elf_Addr v) in apply_r_riscv_sub64_rela() argument
309 *(u64 *)location -= (u64)v; in apply_r_riscv_sub64_rela()
314 Elf_Addr v) = {
345 int (*handler)(struct module *me, u32 *location, Elf_Addr v); in apply_relocate_add()
349 Elf_Addr v; in apply_relocate_add() local
384 v = sym->st_value + rel[i].r_addend; in apply_relocate_add()
417 v = lo12; in apply_relocate_add()
430 res = handler(me, location, v); in apply_relocate_add()