diff options
Diffstat (limited to 'arch/powerpc/kernel/vdso64')
-rw-r--r-- | arch/powerpc/kernel/vdso64/Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile index 43af9b2a6f3b..fa7f1b8f3e50 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile | |||
@@ -4,10 +4,10 @@ obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o | |||
4 | 4 | ||
5 | # Build rules | 5 | # Build rules |
6 | 6 | ||
7 | targets := $(obj-vdso64) vdso64.so | 7 | targets := $(obj-vdso64) vdso64.so vdso64.so.dbg |
8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) | 8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) |
9 | 9 | ||
10 | EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin | 10 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
11 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ | 11 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ |
12 | $(call ld-option, -Wl$(comma)--hash-style=sysv) | 12 | $(call ld-option, -Wl$(comma)--hash-style=sysv) |
13 | EXTRA_AFLAGS := -D__VDSO64__ -s | 13 | EXTRA_AFLAGS := -D__VDSO64__ -s |
@@ -20,9 +20,14 @@ CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) | |||
20 | $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so | 20 | $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so |
21 | 21 | ||
22 | # link rule for the .so file, .lds has to be first | 22 | # link rule for the .so file, .lds has to be first |
23 | $(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) | 23 | $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) |
24 | $(call if_changed,vdso64ld) | 24 | $(call if_changed,vdso64ld) |
25 | 25 | ||
26 | # strip rule for the .so file | ||
27 | $(obj)/%.so: OBJCOPYFLAGS := -S | ||
28 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | ||
29 | $(call if_changed,objcopy) | ||
30 | |||
26 | # assembly rules for the .S files | 31 | # assembly rules for the .S files |
27 | $(obj-vdso64): %.o: %.S | 32 | $(obj-vdso64): %.o: %.S |
28 | $(call if_changed_dep,vdso64as) | 33 | $(call if_changed_dep,vdso64as) |
@@ -33,4 +38,12 @@ quiet_cmd_vdso64ld = VDSO64L $@ | |||
33 | quiet_cmd_vdso64as = VDSO64A $@ | 38 | quiet_cmd_vdso64as = VDSO64A $@ |
34 | cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< | 39 | cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< |
35 | 40 | ||
41 | # install commands for the unstripped file | ||
42 | quiet_cmd_vdso_install = INSTALL $@ | ||
43 | cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ | ||
44 | |||
45 | vdso64.so: $(obj)/vdso64.so.dbg | ||
46 | @mkdir -p $(MODLIB)/vdso | ||
47 | $(call cmd,vdso_install) | ||
36 | 48 | ||
49 | vdso_install: vdso64.so | ||