Lines Matching refs:offset
94 static u32 get_group_rem(u32 group, u32 *offset) in get_group_rem() argument
96 u32 val = *offset; in get_group_rem()
100 *offset = val; in get_group_rem()
126 s32 offset; in apply_relocate() local
132 offset = ELF32_R_SYM(rel->r_info); in apply_relocate()
133 if (offset < 0 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) { in apply_relocate()
139 sym = ((Elf32_Sym *)symsec->sh_addr) + offset; in apply_relocate()
170 offset = __mem_to_opcode_arm(*(u32 *)loc); in apply_relocate()
171 offset = (offset & 0x00ffffff) << 2; in apply_relocate()
172 if (offset & 0x02000000) in apply_relocate()
173 offset -= 0x04000000; in apply_relocate()
175 offset += sym->st_value - loc; in apply_relocate()
184 (offset <= (s32)0xfe000000 || in apply_relocate()
185 offset >= (s32)0x02000000)) in apply_relocate()
186 offset = get_module_plt(module, loc, in apply_relocate()
187 offset + loc + 8) in apply_relocate()
190 if (offset <= (s32)0xfe000000 || in apply_relocate()
191 offset >= (s32)0x02000000) { in apply_relocate()
199 offset >>= 2; in apply_relocate()
200 offset &= 0x00ffffff; in apply_relocate()
203 *(u32 *)loc |= __opcode_to_mem_arm(offset); in apply_relocate()
216 offset = (*(s32 *)loc << 1) >> 1; /* sign extend */ in apply_relocate()
217 offset += sym->st_value - loc; in apply_relocate()
218 if (offset >= 0x40000000 || offset < -0x40000000) { in apply_relocate()
226 *(u32 *)loc |= offset & 0x7fffffff; in apply_relocate()
237 offset = tmp = __mem_to_opcode_arm(*(u32 *)loc); in apply_relocate()
238 offset = ((offset & 0xf0000) >> 4) | (offset & 0xfff); in apply_relocate()
239 offset = (offset ^ 0x8000) - 0x8000; in apply_relocate()
241 offset += sym->st_value; in apply_relocate()
244 offset -= loc; in apply_relocate()
247 offset >>= 16; in apply_relocate()
250 tmp |= ((offset & 0xf000) << 4) | in apply_relocate()
251 (offset & 0x0fff); in apply_relocate()
262 offset = ror32(tmp & 0xff, (tmp & 0xf00) >> 7); in apply_relocate()
264 offset = -offset; in apply_relocate()
265 offset += sym->st_value - loc; in apply_relocate()
266 if (offset < 0) { in apply_relocate()
267 offset = -offset; in apply_relocate()
273 shift = get_group_rem(group, &offset); in apply_relocate()
275 offset >>= 24 - shift; in apply_relocate()
276 offset |= (shift + 8) << 7; in apply_relocate()
278 *(u32 *)loc = __opcode_to_mem_arm((tmp & ~0xfff) | offset); in apply_relocate()
283 offset = tmp & 0xfff; in apply_relocate()
285 offset = -offset; in apply_relocate()
286 offset += sym->st_value - loc; in apply_relocate()
287 if (offset < 0) { in apply_relocate()
288 offset = -offset; in apply_relocate()
293 get_group_rem(2, &offset); in apply_relocate()
295 if (offset > 0xfff) { in apply_relocate()
302 *(u32 *)loc = __opcode_to_mem_arm((tmp & ~0xfff) | offset); in apply_relocate()
343 offset = (sign << 24) | ((~(j1 ^ sign) & 1) << 23) | in apply_relocate()
347 if (offset & 0x01000000) in apply_relocate()
348 offset -= 0x02000000; in apply_relocate()
349 offset += sym->st_value - loc; in apply_relocate()
356 (offset <= (s32)0xff000000 || in apply_relocate()
357 offset >= (s32)0x01000000)) in apply_relocate()
358 offset = get_module_plt(module, loc, in apply_relocate()
359 offset + loc + 4) in apply_relocate()
362 if (offset <= (s32)0xff000000 || in apply_relocate()
363 offset >= (s32)0x01000000) { in apply_relocate()
371 sign = (offset >> 24) & 1; in apply_relocate()
372 j1 = sign ^ (~(offset >> 23) & 1); in apply_relocate()
373 j2 = sign ^ (~(offset >> 22) & 1); in apply_relocate()
375 ((offset >> 12) & 0x03ff)); in apply_relocate()
378 ((offset >> 1) & 0x07ff)); in apply_relocate()
401 offset = ((upper & 0x000f) << 12) | in apply_relocate()
404 offset = (offset ^ 0x8000) - 0x8000; in apply_relocate()
405 offset += sym->st_value; in apply_relocate()
409 offset -= loc; in apply_relocate()
412 offset >>= 16; in apply_relocate()
415 ((offset & 0xf000) >> 12) | in apply_relocate()
416 ((offset & 0x0800) >> 1)); in apply_relocate()
418 ((offset & 0x0700) << 4) | in apply_relocate()
419 (offset & 0x00ff)); in apply_relocate()