[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] hw/loader: Clarify local variable name in load_elf_ram_sym()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/6] hw/loader: Clarify local variable name in load_elf_ram_sym() |
Date: |
Mon, 27 Jan 2025 12:38:21 +0100 |
load_elf_ram_sym() compares target_data_order versus
host data_order. Rename 'data_order' -> 'host_data_order'
to ease code review.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/core/loader.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/core/loader.c b/hw/core/loader.c
index ead10fb6cb5..fc2e8f91267 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -443,7 +443,7 @@ ssize_t load_elf_ram_sym(const char *filename,
int clear_lsb, int data_swab,
AddressSpace *as, bool load_rom, symbol_fn_t sym_cb)
{
- int fd, data_order, target_data_order, must_swab;
+ int fd, host_data_order, target_data_order, must_swab;
ssize_t ret = ELF_LOAD_FAILED;
uint8_t e_ident[EI_NIDENT];
@@ -462,11 +462,11 @@ ssize_t load_elf_ram_sym(const char *filename,
goto fail;
}
#if HOST_BIG_ENDIAN
- data_order = ELFDATA2MSB;
+ host_data_order = ELFDATA2MSB;
#else
- data_order = ELFDATA2LSB;
+ host_data_order = ELFDATA2LSB;
#endif
- must_swab = data_order != e_ident[EI_DATA];
+ must_swab = host_data_order != e_ident[EI_DATA];
if (big_endian) {
target_data_order = ELFDATA2MSB;
} else {
--
2.47.1
- [PATCH 0/6] hw/loader: Pass ELFDATA endian order argument to load_elf(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 1/6] hw/avr/boot: Replace load_elf_ram_sym() -> load_elf_as(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 2/6] hw/loader: Remove unused load_elf_ram(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 3/6] hw/loader: Clarify local variable name in load_elf_ram_sym(),
Philippe Mathieu-Daudé <=
- [PATCH 4/6] hw/loader: Pass ELFDATA endian order argument to load_elf_ram_sym(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 5/6] hw/loader: Pass ELFDATA endian order argument to load_elf_as(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 6/6] hw/loader: Pass ELFDATA endian order argument to load_elf(), Philippe Mathieu-Daudé, 2025/01/27