1 2# List of files in the vdso, has to be asm only for now 3 4obj-vdso32-$(CONFIG_PPC64) = getcpu.o 5obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o \ 6 $(obj-vdso32-y) 7 8# Build rules 9 10ifeq ($(CONFIG_PPC32),y) 11CROSS32CC := $(CC) 12endif 13 14targets := $(obj-vdso32) vdso32.so vdso32.so.dbg 15obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) 16 17GCOV_PROFILE := n 18UBSAN_SANITIZE := n 19 20ccflags-y := -shared -fno-common -fno-builtin 21ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 22 $(call cc-ldoption, -Wl$(comma)--hash-style=both) 23asflags-y := -D__VDSO32__ -s 24 25obj-y += vdso32_wrapper.o 26extra-y += vdso32.lds 27CPPFLAGS_vdso32.lds += -P -C -Upowerpc 28 29# Force dependency (incbin is bad) 30$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so 31 32# link rule for the .so file, .lds has to be first 33$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE 34 $(call if_changed,vdso32ld) 35 36# strip rule for the .so file 37$(obj)/%.so: OBJCOPYFLAGS := -S 38$(obj)/%.so: $(obj)/%.so.dbg FORCE 39 $(call if_changed,objcopy) 40 41# assembly rules for the .S files 42$(obj-vdso32): %.o: %.S FORCE 43 $(call if_changed_dep,vdso32as) 44 45# actual build commands 46quiet_cmd_vdso32ld = VDSO32L $@ 47 cmd_vdso32ld = $(CROSS32CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) 48quiet_cmd_vdso32as = VDSO32A $@ 49 cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< 50 51# install commands for the unstripped file 52quiet_cmd_vdso_install = INSTALL $@ 53 cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ 54 55vdso32.so: $(obj)/vdso32.so.dbg 56 @mkdir -p $(MODLIB)/vdso 57 $(call cmd,vdso_install) 58 59vdso_install: vdso32.so 60