[Lguest] [PATCH] ld.so on FC7 is mmap'ing shared libraries right in over guest memory.

Rusty Russell rusty at rustcorp.com.au
Thu Aug 9 21:07:24 EST 2007


From: Ronald G. Minnich <rminnich at gmail.com>

[ FC7 maps shared libraries very low, where the launcher maps guest's
physical memory.  Quick fix is to link Launcher static, real fix is for
2.6.24. ]

-static is a simple fix. I expect this problem will be more common than we
like, as different distro's make different "improvements" to ld.so

Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile
index 31e794e..60136d8 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/lguest/Makefile
@@ -13,7 +13,9 @@ LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)
 
 CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds
 LDLIBS:=-lz
-
+# Removing this works for some versions of ld.so (eg. Ubuntu Feisty) and
+# not others (eg. FC7).
+LDFLAGS+=-static
 all: lguest.lds lguest
 
 # The linker script on x86 is so complex the only way of creating one





More information about the Lguest mailing list