Commit e3bcf5e2 authored by Ronald G. Minnich's avatar Ronald G. Minnich Committed by Linus Torvalds

lguest: avoid shared libraries mapped over guest memory

Some versions of ld.so mmap the shared libraries right in over guest
memory, so compile lguest statically by default.

[ 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: default avatarRonald G. Minnich <rminnich@gmail.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0d027c01
...@@ -13,7 +13,9 @@ LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) ...@@ -13,7 +13,9 @@ LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)
CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds
LDLIBS:=-lz 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 all: lguest.lds lguest
# The linker script on x86 is so complex the only way of creating one # The linker script on x86 is so complex the only way of creating one
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment