Commit 03f81dc50caf6360aa5343264fed8868e22d9058

Authored by Al Viro
Committed by Linus Torvalds
1 parent 776cfebb43

[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 <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 3 changed files with 8 additions and 15 deletions Side-by-side Diff

... ... @@ -96,15 +96,11 @@
96 96  
97 97 $(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch)
98 98  
99   -prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \
100   - $(ARCH_DIR)/kernel/vmlinux.lds.S
  99 +prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS)
101 100  
102 101 LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
103 102 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
104 103  
105   -LD_SCRIPT-$(CONFIG_LD_SCRIPT_STATIC) := uml.lds.S
106   -LD_SCRIPT-$(CONFIG_LD_SCRIPT_DYN) := dyn.lds.S
107   -
108 104 CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT
109 105 CONFIG_KERNEL_STACK_ORDER ?= 2
110 106 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
... ... @@ -144,15 +140,6 @@
144 140 $(Q)$(MAKE) $(clean)=$(ARCH_DIR)/util
145 141 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
146 142 -o -name '*.gcov' \) -type f -print | xargs rm -f
147   -
148   -#We need to re-preprocess this when the symlink dest changes.
149   -#So we touch it when needed.
150   -$(ARCH_DIR)/kernel/vmlinux.lds.S: FORCE
151   - $(Q)if [ "$(shell readlink $@)" != "$(LD_SCRIPT-y)" ]; then \
152   - echo ' SYMLINK $@'; \
153   - ln -sf $(LD_SCRIPT-y) $@; \
154   - touch $@; \
155   - fi;
156 143  
157 144 $(SYMLINK_HEADERS):
158 145 @echo ' SYMLINK $@'
arch/um/kernel/Makefile
... ... @@ -4,7 +4,7 @@
4 4 #
5 5  
6 6 extra-y := vmlinux.lds
7   -clean-files := vmlinux.lds.S
  7 +clean-files :=
8 8  
9 9 obj-y = checksum.o config.o exec_kern.o exitcode.o \
10 10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \
arch/um/kernel/vmlinux.lds.S
  1 +#include <linux/config.h>
  2 +#ifdef CONFIG_LD_SCRIPT_STATIC
  3 +#include "uml.lds.S"
  4 +#else
  5 +#include "dyn.lds.S"
  6 +#endif