random_offset
unsigned long random_offset;
random_offset = get_random_boot() << 16;
random_offset &= (CONFIG_RANDOMIZE_BASE_MAX_OFFSET - 1);
if (random_offset < kernel_length)
random_offset += ALIGN(kernel_length, 0xffff);
#define RELOCATED_KASLR(x) ((void *)((long)x + random_offset))
static inline void __init update_reloc_offset(unsigned long *addr, long random_offset)
unsigned long random_offset = 0;
random_offset = (unsigned long)location_new - (unsigned long)(_text);
if (random_offset) {
reloc_offset += random_offset;
update_reloc_offset(&reloc_offset, random_offset);
relocate_absolute(random_offset);
return random_offset;
static inline void __init relocate_absolute(long random_offset)
offset = random_offset(start, end,