blob: 596a81428a72a7ccd6d0d3bae1eff7b33937e329 (
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
|
mistranslation: 0.671
instruction: 0.584
graphic: 0.569
semantic: 0.512
device: 0.505
other: 0.344
network: 0.288
boot: 0.247
vnc: 0.215
socket: 0.195
assembly: 0.078
KVM: 0.071
linux-user elf loader issue
all versions up to 4.0 (I didn't test others)
file affected linux-user/elfload.c
function load_elf_image
if (phdr[i].p_type == PT_LOAD) {
- abi_ulong a = phdr[i].p_vaddr - phdr[i].p_offset;
+ abi_ulong a = phdr[i].p_vaddr ; // - phdr[i].p_offset;
if (a < loaddr) {
loaddr = a;
To the best of my understanding of the elf format p_offset is not a virtual offset. In fact, when I load statically compiled applications, the load fails because the libc before main is trying to access phdr in the executable image but that memory is not mapped -- this is caused by the wrong loaddr above.
Have you got a test case? The check-tcg tests all pass and they are statically linked elfs.
[Expired for QEMU because there has been no activity for 60 days.]
|