diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-26 18:01:41 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-31 19:36:44 +0100 |
commit | adc1a4a26a9e060c76f213e2b5bf275519844068 (patch) | |
tree | 7c51d4b4c5b8fd1fc58ac8c93e868a766f0a871e /hw/core | |
parent | 90f5c86acbfcd1f19fd1245c96aa2c51be31361a (diff) | |
download | qemu-adc1a4a26a9e060c76f213e2b5bf275519844068.zip qemu-adc1a4a26a9e060c76f213e2b5bf275519844068.tar.gz qemu-adc1a4a26a9e060c76f213e2b5bf275519844068.tar.bz2 |
hw/loader: Pass ELFDATA endian order argument to load_elf()
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
TARGET_BIG_ENDIAN -> TARGET_BIG_ENDIAN ? ELFDATA2MSB : ELFDATA2LSB
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250127113824.50177-7-philmd@linaro.org>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/loader.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c index cc0631e..fd25c5e 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -409,12 +409,11 @@ ssize_t load_elf(const char *filename, uint64_t (*elf_note_fn)(void *, void *, bool), uint64_t (*translate_fn)(void *, uint64_t), void *translate_opaque, uint64_t *pentry, uint64_t *lowaddr, - uint64_t *highaddr, uint32_t *pflags, int big_endian, + uint64_t *highaddr, uint32_t *pflags, int elf_data_order, int elf_machine, int clear_lsb, int data_swab) { return load_elf_as(filename, elf_note_fn, translate_fn, translate_opaque, - pentry, lowaddr, highaddr, pflags, - big_endian ? ELFDATA2MSB : ELFDATA2LSB, + pentry, lowaddr, highaddr, pflags, elf_data_order, elf_machine, clear_lsb, data_swab, NULL); } |