From: Richard Henderson <rth@twiddle.net>
To: Meador Inge <meadori@codesourcery.com>
Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <4FD74D4D.8060104@twiddle.net> (raw)
In-Reply-To: <1339102742-4584-2-git-send-email-meadori@codesourcery.com>
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~
next prev parent reply other threads:[~2012-06-12 14:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 20:59 [Qemu-devel] [RFC PATCH 0/1] linux-user: Issue running applications through ld.so Meador Inge
2012-06-07 20:59 ` [Qemu-devel] [RFC PATCH 1/1] linux-user: Probe the guest base for shared objects when needed Meador Inge
2012-06-12 14:08 ` Richard Henderson [this message]
2012-06-12 18:44 ` Meador Inge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD74D4D.8060104@twiddle.net \
--to=rth@twiddle.net \
--cc=meadori@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).