aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorPierrick Bouvier <pierrick.bouvier@linaro.org>2025-03-20 15:29:33 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2025-03-21 12:53:36 +0100
commite16354b7f2e70d5ece97854d00141e3df4625cf6 (patch)
tree7497880392f0f0d742a209a4d694433f6e5b555c /bsd-user
parent134ab17fffb32a3f86debb4eec9df12f7f833a3b (diff)
downloadqemu-e16354b7f2e70d5ece97854d00141e3df4625cf6.zip
qemu-e16354b7f2e70d5ece97854d00141e3df4625cf6.tar.gz
qemu-e16354b7f2e70d5ece97854d00141e3df4625cf6.tar.bz2
exec/cpu-all: remove BSWAP_NEEDED
This identifier is poisoned, so it can't be used from common code anyway. We replace all occurrences with its definition directly. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Link: https://lore.kernel.org/r/20250320223002.2915728-2-pierrick.bouvier@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/elfload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index 833fa3b..3bca0cc 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -44,7 +44,7 @@ static inline void memcpy_fromfs(void *to, const void *from, unsigned long n)
memcpy(to, from, n);
}
-#ifdef BSWAP_NEEDED
+#if HOST_BIG_ENDIAN != TARGET_BIG_ENDIAN
static void bswap_ehdr(struct elfhdr *ehdr)
{
bswap16s(&ehdr->e_type); /* Object file type */
@@ -111,7 +111,7 @@ static void bswap_note(struct elf_note *en)
bswap32s(&en->n_type);
}
-#else /* ! BSWAP_NEEDED */
+#else
static void bswap_ehdr(struct elfhdr *ehdr) { }
static void bswap_phdr(struct elf_phdr *phdr, int phnum) { }
@@ -119,7 +119,7 @@ static void bswap_shdr(struct elf_shdr *shdr, int shnum) { }
static void bswap_sym(struct elf_sym *sym) { }
static void bswap_note(struct elf_note *en) { }
-#endif /* ! BSWAP_NEEDED */
+#endif /* HOST_BIG_ENDIAN != TARGET_BIG_ENDIAN */
#include "elfcore.c"