Commit 03f81dc5 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] uml: include the linker script rather than symlink it

Make vmlinux.lds.S include appopriate script instead of playing games with
symlinks.
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 776cfebb
...@@ -96,15 +96,11 @@ endef ...@@ -96,15 +96,11 @@ endef
$(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch) $(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch)
prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \ prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS)
$(ARCH_DIR)/kernel/vmlinux.lds.S
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
LD_SCRIPT-$(CONFIG_LD_SCRIPT_STATIC) := uml.lds.S
LD_SCRIPT-$(CONFIG_LD_SCRIPT_DYN) := dyn.lds.S
CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT
CONFIG_KERNEL_STACK_ORDER ?= 2 CONFIG_KERNEL_STACK_ORDER ?= 2
STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
...@@ -145,15 +141,6 @@ archclean: ...@@ -145,15 +141,6 @@ archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f -o -name '*.gcov' \) -type f -print | xargs rm -f
#We need to re-preprocess this when the symlink dest changes.
#So we touch it when needed.
$(ARCH_DIR)/kernel/vmlinux.lds.S: FORCE
$(Q)if [ "$(shell readlink $@)" != "$(LD_SCRIPT-y)" ]; then \
echo ' SYMLINK $@'; \
ln -sf $(LD_SCRIPT-y) $@; \
touch $@; \
fi;
$(SYMLINK_HEADERS): $(SYMLINK_HEADERS):
@echo ' SYMLINK $@' @echo ' SYMLINK $@'
$(Q)cd $(TOPDIR)/$(dir $@) ; \ $(Q)cd $(TOPDIR)/$(dir $@) ; \
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
extra-y := vmlinux.lds extra-y := vmlinux.lds
clean-files := vmlinux.lds.S clean-files :=
obj-y = checksum.o config.o exec_kern.o exitcode.o \ obj-y = checksum.o config.o exec_kern.o exitcode.o \
helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \
......
#include <linux/config.h>
#ifdef CONFIG_LD_SCRIPT_STATIC
#include "uml.lds.S"
#else
#include "dyn.lds.S"
#endif
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