diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/ia32/Makefile | 25 |
1 files changed, 21 insertions, 4 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 |
21 | targets := $(foreach F,sysenter syscall,vsyscall-$F.o vsyscall-$F.so) | 21 | targets := $(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 |
24 | quiet_cmd_syscall = SYSCALL $@ | 25 | quiet_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 | ||
34 | AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 | 39 | AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 |
35 | AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 | 40 | AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 |
41 | |||
42 | vdsos := vdso32-sysenter.so vdso32-syscall.so | ||
43 | |||
44 | quiet_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 | |||
52 | vdso_install: $(vdsos) | ||