]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/loader: Pass ELFDATA endian order argument to load_elf_as()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 26 Jan 2025 14:09:52 +0000 (15:09 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 31 Jan 2025 18:36:44 +0000 (19:36 +0100)
commit90f5c86acbfcd1f19fd1245c96aa2c51be31361a
tree75cf7e3f88cceb86e2bc84d1b30e8f5dba0e9a13
parent3cd6dbce752d0cd78ab85a7f476b7ddc6933e0f2
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>
hw/arm/armv7m.c
hw/arm/boot.c
hw/avr/boot.c
hw/core/generic-loader.c
hw/core/loader.c
include/hw/loader.h