diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-26 15:09:52 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-31 19:36:44 +0100 |
| commit | 90f5c86acbfcd1f19fd1245c96aa2c51be31361a (patch) | |
| tree | 75cf7e3f88cceb86e2bc84d1b30e8f5dba0e9a13 /hw/arm/armv7m.c | |
| parent | 3cd6dbce752d0cd78ab85a7f476b7ddc6933e0f2 (diff) | |
| download | focaccia-qemu-90f5c86acbfcd1f19fd1245c96aa2c51be31361a.tar.gz focaccia-qemu-90f5c86acbfcd1f19fd1245c96aa2c51be31361a.zip | |
hw/loader: Pass ELFDATA endian order argument to load_elf_as()
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 1 -> ELFDATA2MSB Note, this allow removing the target_words_bigendian() call in the GENERIC_LOADER device, where we pass ELFDATANONE. 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-6-philmd@linaro.org>
Diffstat (limited to 'hw/arm/armv7m.c')
| -rw-r--r-- | hw/arm/armv7m.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index a67a890a33..98a6984611 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -608,7 +608,7 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, if (kernel_filename) { image_size = load_elf_as(kernel_filename, NULL, NULL, NULL, &entry, NULL, NULL, - NULL, 0, EM_ARM, 1, 0, as); + NULL, ELFDATA2LSB, EM_ARM, 1, 0, as); if (image_size < 0) { image_size = load_image_targphys_as(kernel_filename, mem_base, mem_size, as); |