diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/vdso/Makefile | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index 47bc2760e6a8..58708f6c1329 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile | |||
@@ -23,25 +23,15 @@ $(obj)/vdso.o: $(obj)/vdso.so | |||
23 | 23 | ||
24 | targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y) | 24 | targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y) |
25 | 25 | ||
26 | # The DSO images are built using a special linker script. | ||
27 | quiet_cmd_syscall = SYSCALL $@ | ||
28 | cmd_syscall = $(CC) -m elf_x86_64 -nostdlib $(SYSCFLAGS_$(@F)) \ | ||
29 | -Wl,-T,$(filter-out FORCE,$^) -o $@ | ||
30 | |||
31 | export CPPFLAGS_vdso.lds += -P -C | 26 | export CPPFLAGS_vdso.lds += -P -C |
32 | 27 | ||
33 | vdso-flags = -fPIC -shared -Wl,-soname=linux-vdso.so.1 \ | 28 | VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -Wl,-soname=linux-vdso.so.1 \ |
34 | $(call ld-option, -Wl$(comma)--hash-style=sysv) \ | 29 | -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 |
35 | -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 | ||
36 | SYSCFLAGS_vdso.so = $(vdso-flags) | ||
37 | SYSCFLAGS_vdso.so.dbg = $(vdso-flags) | ||
38 | 30 | ||
39 | $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so | 31 | $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so |
40 | 32 | ||
41 | $(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE | ||
42 | |||
43 | $(obj)/vdso.so.dbg: $(src)/vdso.lds $(vobjs) FORCE | 33 | $(obj)/vdso.so.dbg: $(src)/vdso.lds $(vobjs) FORCE |
44 | $(call if_changed,syscall) | 34 | $(call if_changed,vdso) |
45 | 35 | ||
46 | $(obj)/%.so: OBJCOPYFLAGS := -S | 36 | $(obj)/%.so: OBJCOPYFLAGS := -S |
47 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | 37 | $(obj)/%.so: $(obj)/%.so.dbg FORCE |
@@ -49,8 +39,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE | |||
49 | 39 | ||
50 | CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 | 40 | CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 |
51 | 41 | ||
52 | $(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL) | 42 | $(vobjs): KBUILD_CFLAGS = $(CFL) |
53 | $(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL) | ||
54 | 43 | ||
55 | targets += vdso-syms.lds | 44 | targets += vdso-syms.lds |
56 | obj-$(VDSO64-y) += vdso-syms.lds | 45 | obj-$(VDSO64-y) += vdso-syms.lds |