aboutsummaryrefslogtreecommitdiff
path: root/hw/xtensa/sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xtensa/sim.c')
-rw-r--r--hw/xtensa/sim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 0a1fd90..1cea29c 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -100,7 +100,8 @@ void xtensa_sim_load_kernel(XtensaCPU *cpu, MachineState *machine)
if (kernel_filename) {
uint64_t elf_entry;
int success = load_elf(kernel_filename, NULL, translate_phys_addr, cpu,
- &elf_entry, NULL, NULL, NULL, TARGET_BIG_ENDIAN,
+ &elf_entry, NULL, NULL, NULL,
+ TARGET_BIG_ENDIAN ? ELFDATA2MSB : ELFDATA2LSB,
EM_XTENSA, 0, 0);
if (success > 0) {