提交 7b99edc7 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] uml: clean up remapping code build magic

kills unmap magic
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 de2fe5e0
......@@ -129,7 +129,7 @@ CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \
-DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \
-DELF_FORMAT="$(ELF_FORMAT)" $(CPP_MODE-y) \
-DKERNEL_STACK_SIZE=$(STACK_SIZE) \
-DUNMAP_PATH=arch/um/sys-$(SUBARCH)/unmap_fin.o
-DUNMAP_PATH=arch/um/sys-$(SUBARCH)/unmap.o
#The wrappers will select whether using "malloc" or the kernel allocator.
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
......
clean-files += unmap_tmp.o unmap_fin.o unmap.o
ifdef CONFIG_MODE_TT
#Always build unmap_fin.o
extra-y += unmap_fin.o
#Do dependency tracking for unmap.o (it will be always built, but won't get the tracking unless we use this).
targets += unmap.o
#XXX: partially copied from arch/um/scripts/Makefile.rules
$(obj)/unmap.o: _c_flags = $(call unprofile,$(CFLAGS))
quiet_cmd_wrapld = LD $@
define cmd_wrapld
$(LD) $(LDFLAGS) -r -o $(obj)/unmap_tmp.o $< ; \
$(OBJCOPY) $(UML_OBJCOPYFLAGS) $(obj)/unmap_tmp.o $@ -G switcheroo
endef
$(obj)/unmap_fin.o : $(obj)/unmap.o FORCE
$(call if_changed,wrapld)
endif
......@@ -11,6 +11,7 @@ USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o
include arch/um/scripts/Makefile.rules
$(obj)/stub_segv.o : _c_flags = $(call unprofile,$(CFLAGS))
extra-$(CONFIG_MODE_TT) += unmap.o
include arch/um/scripts/Makefile.unmap
$(obj)/stub_segv.o $(obj)/unmap.o: \
_c_flags = $(call unprofile,$(CFLAGS))
......@@ -19,6 +19,7 @@ USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o
include arch/um/scripts/Makefile.rules
$(obj)/stub_segv.o: _c_flags = $(call unprofile,$(CFLAGS))
extra-$(CONFIG_MODE_TT) += unmap.o
include arch/um/scripts/Makefile.unmap
$(obj)/stub_segv.o $(obj)/unmap.o: \
_c_flags = $(call unprofile,$(CFLAGS))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册