diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c index c1345d58..6180764d 100644 --- a/kexec/arch/i386/kexec-bzImage.c +++ b/kexec/arch/i386/kexec-bzImage.c @@ -200,10 +200,10 @@ int do_bzImage_load(struct kexec_info *info, * overflow takes place while applying relocations. */ if (!real_mode_entry && relocatable_kernel) - elf_rel_build_load(info, &info->rhdr, (char *) purgatory, purgatory_size, + elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size, 0x3000, 0x7fffffff, -1, 0); else - elf_rel_build_load(info, &info->rhdr, (char *) purgatory, purgatory_size, + elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size, 0x3000, 640*1024, -1, 0); dbgprintf("Loaded purgatory at addr 0x%lx\n", info->rhdr.rel_addr); /* The argument/parameter segment */ diff --git a/kexec/arch/i386/kexec-elf-x86.c b/kexec/arch/i386/kexec-elf-x86.c index 2e394e94..ccc57786 100644 --- a/kexec/arch/i386/kexec-elf-x86.c +++ b/kexec/arch/i386/kexec-elf-x86.c @@ -191,7 +191,7 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len, /* Do we want arguments? */ if (arg_style != ARG_STYLE_NONE) { /* Load the setup code */ - elf_rel_build_load(info, &info->rhdr, (char *) purgatory, purgatory_size, + elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size, 0, ULONG_MAX, 1, 0); } if (arg_style == ARG_STYLE_NONE) { diff --git a/kexec/arch/i386/kexec-multiboot-x86.c b/kexec/arch/i386/kexec-multiboot-x86.c index 2a8a8a8d..970de2af 100644 --- a/kexec/arch/i386/kexec-multiboot-x86.c +++ b/kexec/arch/i386/kexec-multiboot-x86.c @@ -217,7 +217,7 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, elf_exec_build_load(info, &ehdr, buf, len, 0); /* Load the setup code */ - elf_rel_build_load(info, &info->rhdr, (char *) purgatory, purgatory_size, 0, + elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size, 0, ULONG_MAX, 1, 0); /* The first segment will contain the multiboot headers: diff --git a/kexec/arch/ppc64/kexec-elf-ppc64.c b/kexec/arch/ppc64/kexec-elf-ppc64.c index 2a72482c..d65a5d57 100644 --- a/kexec/arch/ppc64/kexec-elf-ppc64.c +++ b/kexec/arch/ppc64/kexec-elf-ppc64.c @@ -207,7 +207,7 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len, } /* Add v2wrap to the current image */ - elf_rel_build_load(info, &info->rhdr, (const char *)purgatory, + elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size, 0, max_addr, 1, 0); /* Add a ram-disk to the current image diff --git a/kexec/kexec.h b/kexec/kexec.h index 63e7bfaf..ccda5398 100644 --- a/kexec/kexec.h +++ b/kexec/kexec.h @@ -226,7 +226,7 @@ extern void arch_reuse_initrd(void); extern int ifdown(void); -extern unsigned char purgatory[]; +extern char purgatory[]; extern size_t purgatory_size; #define BOOTLOADER "kexec" diff --git a/util/bin-to-hex.c b/util/bin-to-hex.c index 5906f936..48a71e75 100644 --- a/util/bin-to-hex.c +++ b/util/bin-to-hex.c @@ -6,7 +6,7 @@ int main(int argc, char **argv) int i; const char *name = argv[1]; printf("#include \n"); - printf("const unsigned char %s[] = {\n", name); + printf("const char %s[] = {\n", name); i = 0; while((c = getchar()) != EOF) { if ((i % 16) != 0) {