mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
cc3d262aa9
commit
134ab17fff
6 changed files with 7 additions and 31 deletions
|
@ -168,13 +168,6 @@ static uint64_t sun4u_load_kernel(const char *kernel_filename,
|
|||
|
||||
kernel_size = 0;
|
||||
if (linux_boot) {
|
||||
int bswap_needed;
|
||||
|
||||
#ifdef BSWAP_NEEDED
|
||||
bswap_needed = 1;
|
||||
#else
|
||||
bswap_needed = 0;
|
||||
#endif
|
||||
kernel_size = load_elf(kernel_filename, NULL, NULL, NULL, kernel_entry,
|
||||
kernel_addr, &kernel_top, NULL,
|
||||
ELFDATA2MSB, EM_SPARCV9, 0, 0);
|
||||
|
@ -182,7 +175,7 @@ static uint64_t sun4u_load_kernel(const char *kernel_filename,
|
|||
*kernel_addr = KERNEL_LOAD_ADDR;
|
||||
*kernel_entry = KERNEL_LOAD_ADDR;
|
||||
kernel_size = load_aout(kernel_filename, KERNEL_LOAD_ADDR,
|
||||
RAM_size - KERNEL_LOAD_ADDR, bswap_needed,
|
||||
RAM_size - KERNEL_LOAD_ADDR, true,
|
||||
TARGET_PAGE_SIZE);
|
||||
}
|
||||
if (kernel_size < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue