From 03f81dc50caf6360aa5343264fed8868e22d9058 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 5 May 2005 16:15:19 -0700 Subject: [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: Al Viro Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/Makefile | 15 +-------------- arch/um/kernel/Makefile | 2 +- arch/um/kernel/vmlinux.lds.S | 6 ++++++ 3 files changed, 8 insertions(+), 15 deletions(-) create mode 100644 arch/um/kernel/vmlinux.lds.S (limited to 'arch/um') diff --git a/arch/um/Makefile b/arch/um/Makefile index 6f75fb251359..f51643028edd 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -96,15 +96,11 @@ endef $(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch) -prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \ - $(ARCH_DIR)/kernel/vmlinux.lds.S +prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static 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 CONFIG_KERNEL_STACK_ORDER ?= 2 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) @@ -145,15 +141,6 @@ archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -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): @echo ' SYMLINK $@' $(Q)cd $(TOPDIR)/$(dir $@) ; \ diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index a9dd6933dfc3..9d2c261b898d 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile @@ -4,7 +4,7 @@ # extra-y := vmlinux.lds -clean-files := vmlinux.lds.S +clean-files := 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 \ diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S new file mode 100644 index 000000000000..1660a769674b --- /dev/null +++ b/arch/um/kernel/vmlinux.lds.S @@ -0,0 +1,6 @@ +#include +#ifdef CONFIG_LD_SCRIPT_STATIC +#include "uml.lds.S" +#else +#include "dyn.lds.S" +#endif -- cgit v1.2.3-59-g8ed1b