linux-user elf loader issue

Bug #1830415 reported by antonio barbalace
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

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.

Tags: linux-user
Revision history for this message
Alex Bennée (ajbennee) wrote :

Have you got a test case? The check-tcg tests all pass and they are statically linked elfs.

tags: added: linux-user
Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.