[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu qemu-doc.texi

From: Paul Brook
Subject: Re: [Qemu-devel] qemu qemu-doc.texi
Date: Mon, 12 Jun 2006 17:47:12 +0100
User-agent: KMail/1.9.1

> Where would I (start to) look for the reasons behind this? Is this
> something that needs to be "fixed" on the ARM side (i.e. fix the location
> where the ARM code looks for the environment)?

Look at the code in load_elf_binary that uses target_mmap to map the loadable 
segments into memory. The page size I'm referring to below is the target page 
size (4k for qemu-arm). target_mmap is more-or-less a wrapper around normal 
mmap that deals with the corner cases and differences in page size when 
host != target. 

There are two issues:
- mmap requires the file offset be a multiple of the page size.  This is 
relatively easy to fix. If the file data is misaligned create an anonymous 
mapping and pread the data.

- The code assumes the VMA of the segments after roundind to a page boundary 
do not overlap. ie. a single memory page will contain data from no more than 
one segment. Fixing this is more complicated and probably involves merging 
the regions used by sections with "overlapping" pages.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]