blob: e63fa746863d2964a8399f2c5c55bc1eb5e9054e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
debug: 0.960
architecture: 0.943
user-level: 0.792
graphic: 0.725
device: 0.693
files: 0.557
performance: 0.520
mistranslation: 0.511
semantic: 0.482
network: 0.478
vnc: 0.356
permissions: 0.354
socket: 0.324
x86: 0.297
boot: 0.292
peripherals: 0.283
ppc: 0.264
i386: 0.207
risc-v: 0.199
PID: 0.187
arm: 0.165
hypervisor: 0.165
register: 0.161
virtual: 0.121
kernel: 0.117
TCG: 0.112
VMM: 0.098
KVM: 0.067
assembly: 0.048
linux-user/elfload.c: byteswap function is not working when ELF is big endian
I run qemu-mipsel for ELF with mips MSB(big endian), it always outputs error message: Invalid ELF image for this architecture. For the ELF I run:
$file busybox
ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, stripped
The section header is not corrupted(MSB, corrputed section header table also outputs same error as above), when I run ELF with LSB, it works perfectly. I debugged with /linux-user/elfload.c, I am sure that the problem comes from byteswap function. But I don't know how to handle it. I really hope this can be fixed ASAP. Really appreciate your help.
The qemu-mipsel binary is for little-endian executables (that's what the "el" part means), so it is expected that it does not handle BE ELF files. Try "qemu-mips", which is the equivalent QEMU binary for big-endian executables.
|