Lines Matching refs:offset
27 #define RELOCATED(x) ((void *)((long)x + offset))
42 int __weak plat_post_relocation(long offset) in plat_post_relocation() argument
74 static void __init apply_r_mips_64_rel(u32 *loc_new, long offset) in apply_r_mips_64_rel() argument
76 *(u64 *)loc_new += offset; in apply_r_mips_64_rel()
79 static void __init apply_r_mips_32_rel(u32 *loc_new, long offset) in apply_r_mips_32_rel() argument
81 *loc_new += offset; in apply_r_mips_32_rel()
84 static int __init apply_r_mips_26_rel(u32 *loc_orig, u32 *loc_new, long offset) in apply_r_mips_26_rel() argument
88 if (offset % 4) { in apply_r_mips_26_rel()
98 target_addr += offset; in apply_r_mips_26_rel()
115 long offset) in apply_r_mips_hi16_rel() argument
120 target += offset; in apply_r_mips_hi16_rel()
126 long offset) in reloc_handler() argument
130 apply_r_mips_64_rel(loc_new, offset); in reloc_handler()
133 apply_r_mips_32_rel(loc_new, offset); in reloc_handler()
136 return apply_r_mips_26_rel(loc_orig, loc_new, offset); in reloc_handler()
138 apply_r_mips_hi16_rel(loc_orig, loc_new, offset); in reloc_handler()
149 static int __init do_relocations(void *kbase_old, void *kbase_new, long offset) in do_relocations() argument
166 res = reloc_handler(type, loc_orig, loc_new, offset); in do_relocations()
179 static int __init relocate_exception_table(long offset) in relocate_exception_table() argument
187 *e += offset; in relocate_exception_table()
269 unsigned long offset; in determine_relocation_address() local
276 offset = get_random_boot() << 16; in determine_relocation_address()
277 offset &= (CONFIG_RANDOMIZE_BASE_MAX_OFFSET - 1); in determine_relocation_address()
278 if (offset < kernel_length) in determine_relocation_address()
279 offset += ALIGN(kernel_length, 0xffff); in determine_relocation_address()
310 static inline void __init update_kaslr_offset(unsigned long *addr, long offset) in update_kaslr_offset() argument
314 *new_addr = (unsigned long)offset; in update_kaslr_offset()
329 long offset = 0; in relocate_kernel() local
354 offset = (unsigned long)loc_new - (unsigned long)(&_text); in relocate_kernel()
359 if (offset) { in relocate_kernel()
387 res = do_relocations(&_text, loc_new, offset); in relocate_kernel()
394 res = relocate_exception_table(offset); in relocate_kernel()
419 if (plat_post_relocation(offset)) in relocate_kernel()
429 update_kaslr_offset(&__kaslr_offset, offset); in relocate_kernel()