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

From: Rusty Russell
Date: Thu Aug 09 2007 - 07:08:28 EST


From: Ronald G. Minnich <rminnich@xxxxxxxxx>

[ 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@xxxxxxxxx>
Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/