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