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 offset = sign_extend32(offset, 25); in apply_relocate()
174 offset += sym->st_value - loc; in apply_relocate()
183 (offset <= (s32)0xfe000000 || in apply_relocate()
184 offset >= (s32)0x02000000)) in apply_relocate()
185 offset = get_module_plt(module, loc, in apply_relocate()
186 offset + loc + 8) in apply_relocate()
189 if (offset <= (s32)0xfe000000 || in apply_relocate()
190 offset >= (s32)0x02000000) { in apply_relocate()
198 offset >>= 2; in apply_relocate()
199 offset &= 0x00ffffff; in apply_relocate()
202 *(u32 *)loc |= __opcode_to_mem_arm(offset); in apply_relocate()
215 offset = (*(s32 *)loc << 1) >> 1; /* sign extend */ in apply_relocate()
216 offset += sym->st_value - loc; in apply_relocate()
217 if (offset >= 0x40000000 || offset < -0x40000000) { in apply_relocate()
225 *(u32 *)loc |= offset & 0x7fffffff; in apply_relocate()
236 offset = tmp = __mem_to_opcode_arm(*(u32 *)loc); in apply_relocate()
237 offset = ((offset & 0xf0000) >> 4) | (offset & 0xfff); in apply_relocate()
238 offset = sign_extend32(offset, 15); in apply_relocate()
240 offset += sym->st_value; in apply_relocate()
243 offset -= loc; in apply_relocate()
246 offset >>= 16; in apply_relocate()
249 tmp |= ((offset & 0xf000) << 4) | in apply_relocate()
250 (offset & 0x0fff); in apply_relocate()
261 offset = ror32(tmp & 0xff, (tmp & 0xf00) >> 7); in apply_relocate()
263 offset = -offset; in apply_relocate()
264 offset += sym->st_value - loc; in apply_relocate()
265 if (offset < 0) { in apply_relocate()
266 offset = -offset; in apply_relocate()
272 shift = get_group_rem(group, &offset); in apply_relocate()
274 offset >>= 24 - shift; in apply_relocate()
275 offset |= (shift + 8) << 7; in apply_relocate()
277 *(u32 *)loc = __opcode_to_mem_arm((tmp & ~0xfff) | offset); in apply_relocate()
282 offset = tmp & 0xfff; in apply_relocate()
284 offset = -offset; in apply_relocate()
285 offset += sym->st_value - loc; in apply_relocate()
286 if (offset < 0) { in apply_relocate()
287 offset = -offset; in apply_relocate()
292 get_group_rem(2, &offset); in apply_relocate()
294 if (offset > 0xfff) { in apply_relocate()
301 *(u32 *)loc = __opcode_to_mem_arm((tmp & ~0xfff) | offset); in apply_relocate()
342 offset = (sign << 24) | ((~(j1 ^ sign) & 1) << 23) | in apply_relocate()
346 offset = sign_extend32(offset, 24); in apply_relocate()
347 offset += sym->st_value - loc; in apply_relocate()
354 (offset <= (s32)0xff000000 || in apply_relocate()
355 offset >= (s32)0x01000000)) in apply_relocate()
356 offset = get_module_plt(module, loc, in apply_relocate()
357 offset + loc + 4) in apply_relocate()
360 if (offset <= (s32)0xff000000 || in apply_relocate()
361 offset >= (s32)0x01000000) { in apply_relocate()
369 sign = (offset >> 24) & 1; in apply_relocate()
370 j1 = sign ^ (~(offset >> 23) & 1); in apply_relocate()
371 j2 = sign ^ (~(offset >> 22) & 1); in apply_relocate()
373 ((offset >> 12) & 0x03ff)); in apply_relocate()
376 ((offset >> 1) & 0x07ff)); in apply_relocate()
399 offset = ((upper & 0x000f) << 12) | in apply_relocate()
402 offset = sign_extend32(offset, 15); in apply_relocate()
403 offset += sym->st_value; in apply_relocate()
407 offset -= loc; in apply_relocate()
410 offset >>= 16; in apply_relocate()
413 ((offset & 0xf000) >> 12) | in apply_relocate()
414 ((offset & 0x0800) >> 1)); in apply_relocate()
416 ((offset & 0x0700) << 4) | in apply_relocate()
417 (offset & 0x00ff)); in apply_relocate()