aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/ia32/Makefile25
-rw-r--r--arch/x86_64/Makefile7
2 files changed, 27 insertions, 5 deletions
diff --git a/arch/x86/ia32/Makefile b/arch/x86/ia32/Makefile
index cdae36435e21..e2edda255a84 100644
--- a/arch/x86/ia32/Makefile
+++ b/arch/x86/ia32/Makefile
@@ -18,18 +18,35 @@ $(obj)/syscall32_syscall.o: \
18 $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) 18 $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
19 19
20# Teach kbuild about targets 20# Teach kbuild about targets
21targets := $(foreach F,sysenter syscall,vsyscall-$F.o vsyscall-$F.so) 21targets := $(foreach F,$(addprefix vsyscall-,sysenter syscall),\
22 $F.o $F.so $F.so.dbg)
22 23
23# The DSO images are built using a special linker script 24# The DSO images are built using a special linker script
24quiet_cmd_syscall = SYSCALL $@ 25quiet_cmd_syscall = SYSCALL $@
25 cmd_syscall = $(CC) -m32 -nostdlib -shared -s \ 26 cmd_syscall = $(CC) -m32 -nostdlib -shared \
26 $(call ld-option, -Wl$(comma)--hash-style=sysv) \ 27 $(call ld-option, -Wl$(comma)--hash-style=sysv) \
27 -Wl,-soname=linux-gate.so.1 -o $@ \ 28 -Wl,-soname=linux-gate.so.1 -o $@ \
28 -Wl,-T,$(filter-out FORCE,$^) 29 -Wl,-T,$(filter-out FORCE,$^)
29 30
30$(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \ 31$(obj)/%.so: OBJCOPYFLAGS := -S
31$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE 32$(obj)/%.so: $(obj)/%.so.dbg FORCE
33 $(call if_changed,objcopy)
34
35$(obj)/vsyscall-sysenter.so.dbg $(obj)/vsyscall-syscall.so.dbg: \
36$(obj)/vsyscall-%.so.dbg: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
32 $(call if_changed,syscall) 37 $(call if_changed,syscall)
33 38
34AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 39AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32
35AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 40AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32
41
42vdsos := vdso32-sysenter.so vdso32-syscall.so
43
44quiet_cmd_vdso_install = INSTALL $@
45 cmd_vdso_install = cp $(@:vdso32-%.so=$(obj)/vsyscall-%.so.dbg) \
46 $(MODLIB)/vdso/$@
47
48$(vdsos):
49 @mkdir -p $(MODLIB)/vdso
50 $(call cmd,vdso_install)
51
52vdso_install: $(vdsos)
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 9daa32d1d2a1..d460bef2ab89 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -110,9 +110,14 @@ bzdisk: vmlinux
110fdimage fdimage144 fdimage288 isoimage: vmlinux 110fdimage fdimage144 fdimage288 isoimage: vmlinux
111 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 111 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
112 112
113install: 113install: vdso_install
114 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 114 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
115 115
116vdso_install:
117ifeq ($(CONFIG_IA32_EMULATION),y)
118 $(Q)$(MAKE) $(build)=arch/x86/ia32 $@
119endif
120
116archclean: 121archclean:
117 $(Q)rm -rf $(objtree)/arch/x86_64/boot 122 $(Q)rm -rf $(objtree)/arch/x86_64/boot
118 $(Q)$(MAKE) $(clean)=$(boot) 123 $(Q)$(MAKE) $(clean)=$(boot)