diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-26 15:03:04 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-31 19:36:44 +0100 |
| commit | 3cd6dbce752d0cd78ab85a7f476b7ddc6933e0f2 (patch) | |
| tree | 87fcf6de87c7f6bffe187273a3e8b1026a04d1be /hw/riscv/boot.c | |
| parent | 518f8fdfe265ffff6e2f2ad7a7bbb7f95b270434 (diff) | |
| download | focaccia-qemu-3cd6dbce752d0cd78ab85a7f476b7ddc6933e0f2.tar.gz focaccia-qemu-3cd6dbce752d0cd78ab85a7f476b7ddc6933e0f2.zip | |
hw/loader: Pass ELFDATA endian order argument to load_elf_ram_sym()
Rather than passing a boolean 'is_big_endian' argument, directly pass the ELFDATA, which can be unspecified using the ELFDATANONE value. Update the call sites: 0 -> ELFDATA2LSB Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250127113824.50177-5-philmd@linaro.org>
Diffstat (limited to 'hw/riscv/boot.c')
| -rw-r--r-- | hw/riscv/boot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c index 90e75c69a0..c309441b7d 100644 --- a/hw/riscv/boot.c +++ b/hw/riscv/boot.c @@ -246,7 +246,8 @@ void riscv_load_kernel(MachineState *machine, */ kernel_size = load_elf_ram_sym(kernel_filename, NULL, NULL, NULL, NULL, &info->image_low_addr, &info->image_high_addr, - NULL, 0, EM_RISCV, 1, 0, NULL, true, sym_cb); + NULL, ELFDATA2LSB, EM_RISCV, + 1, 0, NULL, true, sym_cb); if (kernel_size > 0) { info->kernel_size = kernel_size; goto out; |