Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61672
b: refs/heads/master
c: 8ca47e0
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Linus Torvalds committed Jul 19, 2007
1 parent dafd8e9 commit e830748
Show file tree
Hide file tree
Showing 4 changed files with 1,169 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b754416bfe9adac6468e45fba244d77f52048aeb
refs/heads/master: 8ca47e00690914a9e5e6c734baa37c829a2f2fa1
27 changes: 27 additions & 0 deletions trunk/Documentation/lguest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This creates the demonstration utility "lguest" which runs a Linux guest.

# For those people that have a separate object dir, look there for .config
KBUILD_OUTPUT := ../..
ifdef O
ifeq ("$(origin O)", "command line")
KBUILD_OUTPUT := $(O)
endif
endif
# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary.
include $(KBUILD_OUTPUT)/.config
LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)

CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \
-static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds
LDLIBS:=-lz

all: lguest.lds lguest

# The linker script on x86 is so complex the only way of creating one
# which will link our binary in the right place is to mangle the
# default one.
lguest.lds:
$(LD) --verbose | awk '/^==========/ { PRINT=1; next; } /SIZEOF_HEADERS/ { gsub(/0x[0-9A-F]*/, "$(LGUEST_GUEST_TOP)") } { if (PRINT) print $$0; }' > $@

clean:
rm -f lguest.lds lguest
Loading

0 comments on commit e830748

Please sign in to comment.