@@ -106,8 +106,10 @@ static int64_t load_kernel (CPUState *env)
ram_addr_t initrd_offset;
uint32_t *prom_buf;
long prom_size;
+ ElfHandlers handlers = elf_default_handlers;
- if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
+ handlers.translate_fn = cpu_mips_kseg0_to_phys;
+ if (load_elf(loaderparams.kernel_filename,&handlers,
(uint64_t *)&kernel_entry, (uint64_t *)&kernel_low,
(uint64_t *)&kernel_high, 0, ELF_MACHINE, 1)< 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
Unless my C foo is really bad, this means that handlers is
initialized with the contents of elf_default_handlers :). And
that's how every caller works.