aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2007-10-17 12:04:32 -0400
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-17 14:15:18 -0400
commitaf7e6a7464249251efb2c4f67124e4d022985994 (patch)
treee9065a1d8df5c0094d7a0eb258716f05910253ad /arch/x86/ia32
parent8957ecab029669f43512e53521e8b59ec6b07bdd (diff)
x86_64: install unstripped copies of compat vdso on disk
This keeps an unstripped copy of the vDSO images built before they are stripped and embedded in the kernel. The unstripped copies get installed in $(MODLIB)/vdso/ by "make install" (or you can explicitly use the subtarget "make vdso_install"). These files can be useful when they contain source-level debugging information. [ tglx: arch/x86 adaptation ] Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/Makefile25
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
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)