[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1185102573.6344.95.camel@localhost.localdomain>
Date: Sun, 22 Jul 2007 21:09:33 +1000
From: Rusty Russell <rusty@...tcorp.com.au>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: caglar@...dus.org.tr, LKML <linux-kernel@...r.kernel.org>,
virtualization <virtualization@...ts.linux-foundation.org>
Subject: Re: [PATCH] Remove -static from Documentation/lguest/Makefile
On Fri, 2007-07-20 at 08:39 -0700, Jeremy Fitzhardinge wrote:
> 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 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.
The other option is to simply mmap the memory and device descriptors,
then tell the kernel the offset. This means no more linking tricks at
all, but I'd have to check what limit this would impose on maximum guest
physical memory.
And such a significant change is not 2.6.23 material, of course.
Rusty.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists