2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
# List of files in the vdso, has to be asm only for now
|
|
|
|
|
2012-07-04 14:37:11 -06:00
|
|
|
obj-vdso32-$(CONFIG_PPC64) = getcpu.o
|
|
|
|
obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o \
|
|
|
|
$(obj-vdso32-y)
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
# Build rules
|
|
|
|
|
2005-11-11 03:15:21 -07:00
|
|
|
ifeq ($(CONFIG_PPC32),y)
|
|
|
|
CROSS32CC := $(CC)
|
|
|
|
endif
|
|
|
|
|
2007-10-02 14:30:04 -06:00
|
|
|
targets := $(obj-vdso32) vdso32.so vdso32.so.dbg
|
2005-04-16 16:20:36 -06:00
|
|
|
obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
|
|
|
|
|
2009-08-09 13:02:51 -06:00
|
|
|
GCOV_PROFILE := n
|
2016-01-20 16:00:58 -07:00
|
|
|
UBSAN_SANITIZE := n
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2010-09-22 14:51:09 -06:00
|
|
|
ccflags-y := -shared -fno-common -fno-builtin
|
|
|
|
ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
|
2015-08-06 21:05:42 -06:00
|
|
|
$(call cc-ldoption, -Wl$(comma)--hash-style=both)
|
2010-09-22 14:51:09 -06:00
|
|
|
asflags-y := -D__VDSO32__ -s
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
obj-y += vdso32_wrapper.o
|
|
|
|
extra-y += vdso32.lds
|
2005-11-11 05:04:40 -07:00
|
|
|
CPPFLAGS_vdso32.lds += -P -C -Upowerpc
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
# Force dependency (incbin is bad)
|
|
|
|
$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
|
|
|
|
|
|
|
|
# link rule for the .so file, .lds has to be first
|
2007-10-02 14:30:04 -06:00
|
|
|
$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32)
|
2005-04-16 16:20:36 -06:00
|
|
|
$(call if_changed,vdso32ld)
|
|
|
|
|
2007-10-02 14:30:04 -06:00
|
|
|
# strip rule for the .so file
|
|
|
|
$(obj)/%.so: OBJCOPYFLAGS := -S
|
|
|
|
$(obj)/%.so: $(obj)/%.so.dbg FORCE
|
|
|
|
$(call if_changed,objcopy)
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
# assembly rules for the .S files
|
|
|
|
$(obj-vdso32): %.o: %.S
|
|
|
|
$(call if_changed_dep,vdso32as)
|
|
|
|
|
|
|
|
# actual build commands
|
|
|
|
quiet_cmd_vdso32ld = VDSO32L $@
|
|
|
|
cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@
|
|
|
|
quiet_cmd_vdso32as = VDSO32A $@
|
|
|
|
cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
|
|
|
|
|
2007-10-02 14:30:04 -06:00
|
|
|
# install commands for the unstripped file
|
|
|
|
quiet_cmd_vdso_install = INSTALL $@
|
|
|
|
cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
|
|
|
|
|
|
|
|
vdso32.so: $(obj)/vdso32.so.dbg
|
|
|
|
@mkdir -p $(MODLIB)/vdso
|
|
|
|
$(call cmd,vdso_install)
|
|
|
|
|
|
|
|
vdso_install: vdso32.so
|