extern int vmalloc_size_set;
extern char __boot_data_start[], __boot_data_end[];
extern char __boot_data_preserved_start[], __boot_data_preserved_end[];
-extern int __vmlinux_relocs_64_start[], __vmlinux_relocs_64_end[];
+extern char __vmlinux_relocs_64_start[], __vmlinux_relocs_64_end[];
extern char _decompressor_syms_start[], _decompressor_syms_end[];
extern char _stack_start[], _stack_end[];
extern char _end[], _decompressor_end[];
static void rescue_relocs(void) {}
static void free_relocs(void) {}
#else
-int *vmlinux_relocs_64_start;
-int *vmlinux_relocs_64_end;
+static int *vmlinux_relocs_64_start;
+static int *vmlinux_relocs_64_end;
static void rescue_relocs(void)
{
- unsigned long size, nrelocs;
+ unsigned long size = __vmlinux_relocs_64_end - __vmlinux_relocs_64_start;
- nrelocs = __vmlinux_relocs_64_end - __vmlinux_relocs_64_start;
- size = nrelocs * sizeof(uint32_t);
vmlinux_relocs_64_start = (void *)physmem_alloc_top_down(RR_RELOC, size, 0);
- memmove(vmlinux_relocs_64_start, (void *)__vmlinux_relocs_64_start, size);
- vmlinux_relocs_64_end = vmlinux_relocs_64_start + nrelocs;
+ vmlinux_relocs_64_end = (void *)vmlinux_relocs_64_start + size;
+ memmove(vmlinux_relocs_64_start, __vmlinux_relocs_64_start, size);
}
static void free_relocs(void)