]> git.ipfire.org Git - thirdparty/qemu.git/commit
load_aout: replace bswap_needed with big_endian
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Mar 2025 11:54:31 +0000 (12:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Mar 2025 11:51:16 +0000 (12:51 +0100)
commit134ab17fffb32a3f86debb4eec9df12f7f833a3b
tree46f26c5fff8280a3a17ce4ca4a7723b76d60cba9
parentcc3d262aa93a42e19c38f6acb6d0f6012a71eb4b
load_aout: replace bswap_needed with big_endian

Targets know whether they are big-endian more than they know if
the endianness is different from the host: the former is mostly
a constant, at least in machine creation code, while the latter
has to be computed with TARGET_BIG_ENDIAN != HOST_BIG_ENDIAN or
something like that.

load_aout, however, takes a "bswap_needed" argument.  Replace
it with a "big_endian" argument; even though all users are
big-endian, it is cheap enough to keep the optional swapping
functionality even for little-endian boards.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/loader.c
hw/ppc/mac_newworld.c
hw/ppc/mac_oldworld.c
hw/sparc/sun4m.c
hw/sparc64/sun4u.c
include/hw/loader.h