diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 5f267850e061afdcce8b7702048490e5ec558ed1..be6c9b5622d6e491a1740e298a5e4c7ec4717bab 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -68,7 +68,7 @@ static void cpu_openrisc_load_kernel(ram_addr_t ram_size, if (kernel_filename && !qtest_enabled()) { kernel_size = load_elf(kernel_filename, NULL, NULL, - &elf_entry, NULL, NULL, 1, ELF_MACHINE, 1); + &elf_entry, NULL, NULL, 1, EM_OPENRISC, 1); entry = elf_entry; if (kernel_size < 0) { kernel_size = load_uimage(kernel_filename, diff --git a/target-openrisc/cpu.h b/target-openrisc/cpu.h index 560210d9e5e750f6e734e7b702233d98e773d701..1ff1c9ec2af0c13a9748de9733af20e6a9b8470b 100644 --- a/target-openrisc/cpu.h +++ b/target-openrisc/cpu.h @@ -21,7 +21,6 @@ #define CPU_OPENRISC_H #define TARGET_LONG_BITS 32 -#define ELF_MACHINE EM_OPENRISC #define CPUArchState struct CPUOpenRISCState