Lines Matching refs:offset
26 #define RELOCATED(x) ((void *)((long)x + offset))
41 int __weak plat_post_relocation(long offset) in plat_post_relocation() argument
73 static int __init apply_r_mips_64_rel(u32 *loc_orig, u32 *loc_new, long offset) in apply_r_mips_64_rel() argument
75 *(u64 *)loc_new += offset; in apply_r_mips_64_rel()
80 static int __init apply_r_mips_32_rel(u32 *loc_orig, u32 *loc_new, long offset) in apply_r_mips_32_rel() argument
82 *loc_new += offset; in apply_r_mips_32_rel()
87 static int __init apply_r_mips_26_rel(u32 *loc_orig, u32 *loc_new, long offset) in apply_r_mips_26_rel() argument
91 if (offset % 4) { in apply_r_mips_26_rel()
101 target_addr += offset; in apply_r_mips_26_rel()
117 static int __init apply_r_mips_hi16_rel(u32 *loc_orig, u32 *loc_new, long offset) in apply_r_mips_hi16_rel() argument
122 target += offset; in apply_r_mips_hi16_rel()
135 int __init do_relocations(void *kbase_old, void *kbase_new, long offset) in do_relocations() argument
159 res = reloc_handlers_rel[type](loc_orig, loc_new, offset); in do_relocations()
172 static int __init relocate_exception_table(long offset) in relocate_exception_table() argument
180 *e += offset; in relocate_exception_table()
262 unsigned long offset; in determine_relocation_address() local
269 offset = get_random_boot() << 16; in determine_relocation_address()
270 offset &= (CONFIG_RANDOMIZE_BASE_MAX_OFFSET - 1); in determine_relocation_address()
271 if (offset < kernel_length) in determine_relocation_address()
272 offset += ALIGN(kernel_length, 0xffff); in determine_relocation_address()
308 long offset = 0; in relocate_kernel() local
333 offset = (unsigned long)loc_new - (unsigned long)(&_text); in relocate_kernel()
338 if (offset) { in relocate_kernel()
366 res = do_relocations(&_text, loc_new, offset); in relocate_kernel()
373 res = relocate_exception_table(offset); in relocate_kernel()
398 if (plat_post_relocation(offset)) in relocate_kernel()
416 unsigned long offset; in show_kernel_relocation() local
418 offset = __pa_symbol(_text) - __pa_symbol(VMLINUX_LOAD_ADDRESS); in show_kernel_relocation()
420 if (IS_ENABLED(CONFIG_RELOCATABLE) && offset > 0) { in show_kernel_relocation()
422 pr_cont("Kernel relocated by 0x%pK\n", (void *)offset); in show_kernel_relocation()