From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: caglar@pardus.org.tr, LKML <linux-kernel@vger.kernel.org>,
virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] Remove -static from Documentation/lguest/Makefile
Date: Fri, 20 Jul 2007 08:39:12 -0700 [thread overview]
Message-ID: <46A0D720.9000204@goop.org> (raw)
In-Reply-To: <1184932973.10380.293.camel@localhost.localdomain>
Rusty Russell wrote:
> How's this?
> ===
> Link lguest example launcher non-static
>
> S.Caglar Onur points out that many distributions don't ship a static
> zlib. Unfortunately the launcher currently maps virtual device memory
> where shared libraries want to go.
>
> The solution is to pre-scan the args to figure out how much memory we
> have, then allocate devices above that, rather than down from the top.
>
The technique I used in Valgrind was to have a small core program which
links up high, which then uses mmap to reserve all the client (guest)
address space, and then dlopens any other libraries, which are
guaranteed to be loaded high.
There are a number of subtleties, of course. You need to make the
initial stub static, but some versions of glibc have difficulties with
having static programs use dlopen. And it means you need to use dlsym
and do all your library function accesses indirectly, which may not be a
problem for a relatively simple library like libz.
J
next prev parent reply other threads:[~2007-07-20 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707192313.44106.caglar@pardus.org.tr>
2007-07-20 12:02 ` [PATCH] Remove -static from Documentation/lguest/Makefile Rusty Russell
[not found] ` <1184932973.10380.293.camel@localhost.localdomain>
2007-07-20 15:39 ` Jeremy Fitzhardinge [this message]
2007-07-22 11:09 ` Rusty Russell
2007-07-22 11:12 ` [PATCH] Make lguest example launcher non-static and simplify Rusty Russell
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=46A0D720.9000204@goop.org \
--to=jeremy@goop.org \
--cc=caglar@pardus.org.tr \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/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).