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 18 19ccflags-y := -shared -fno-common -fno-builtin 20ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 21 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 22asflags-y := -D__VDSO32__ -s 23 24obj-y += vdso32_wrapper.o 25extra-y += vdso32.lds 26CPPFLAGS_vdso32.lds += -P -C -Upowerpc 27 28# Force dependency (incbin is bad) 29$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so 30 31# link rule for the .so file, .lds has to be first 32$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) 33 $(call if_changed,vdso32ld) 34 35# strip rule for the .so file 36$(obj)/%.so: OBJCOPYFLAGS := -S 37$(obj)/%.so: $(obj)/%.so.dbg FORCE 38 $(call if_changed,objcopy) 39 40# assembly rules for the .S files 41$(obj-vdso32): %.o: %.S 42 $(call if_changed_dep,vdso32as) 43 44# actual build commands 45quiet_cmd_vdso32ld = VDSO32L $@ 46 cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ 47quiet_cmd_vdso32as = VDSO32A $@ 48 cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< 49 50# install commands for the unstripped file 51quiet_cmd_vdso_install = INSTALL $@ 52 cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ 53 54vdso32.so: $(obj)/vdso32.so.dbg 55 @mkdir -p $(MODLIB)/vdso 56 $(call cmd,vdso_install) 57 58vdso_install: vdso32.so 59