qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 1/1] linux-user: Probe the guest base for sh


From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC PATCH 1/1] linux-user: Probe the guest base for shared objects when needed
Date: Tue, 12 Jun 2012 07:08:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 2012-06-07 13:59, Meador Inge wrote:
>      load_addr = loaddr;
>      if (ehdr->e_type == ET_DYN) {
> +        if (loaddr < mmap_min_addr)
> +            probe_guest_base(image_name, loaddr, hiaddr);

This doesn't make any sense.  loaddr is almost certainly 0, unless
you've pre-linked the ld.so image.  But the next statement is letting
the system pick the address at which the image will be loaded.

What you're actually wanting is to probe the address ranges of the
"real" program, which since this is essentially a program running a
program is not visible to us at all.

I think this is one of those cases where the -B or -R options
(or QEMU_GUEST_BASE and QEMU_RESERVED_VA env variables) are the best
way forward for whatever cpu you're emulating.  That or a change to
the target's default ld script, not to link real executables quite so 
low in the address space.


r~



reply via email to

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