2005-04-17 02:20:36 +04:00
# List of files in the vdso, has to be asm only for now
2012-07-05 00:37:11 +04:00
obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
2005-04-17 02:20:36 +04:00
# Build rules
2007-10-03 00:30:04 +04:00
targets := $( obj-vdso64) vdso64.so vdso64.so.dbg
2005-04-17 02:20:36 +04:00
obj-vdso64 := $( addprefix $( obj) /, $( obj-vdso64) )
2009-08-09 23:02:51 +04:00
GCOV_PROFILE := n
2016-01-21 02:00:58 +03:00
UBSAN_SANITIZE := n
2009-08-09 23:02:51 +04:00
2010-09-23 00:51:09 +04:00
ccflags-y := -shared -fno-common -fno-builtin
ccflags-y += -nostdlib -Wl,-soname= linux-vdso64.so.1 \
2015-08-07 06:05:42 +03:00
$( call cc-ldoption, -Wl$( comma) --hash-style= both)
2010-09-23 00:51:09 +04:00
asflags-y := -D__VDSO64__ -s
2005-04-17 02:20:36 +04:00
obj-y += vdso64_wrapper.o
extra-y += vdso64.lds
CPPFLAGS_vdso64.lds += -P -C -U$( ARCH)
# Force dependency (incbin is bad)
$(obj)/vdso64_wrapper.o : $( obj ) /vdso 64.so
# link rule for the .so file, .lds has to be first
2016-08-09 15:17:29 +03:00
$(obj)/vdso64.so.dbg : $( src ) /vdso 64.lds $( obj -vdso 64) FORCE
2005-04-17 02:20:36 +04:00
$( call if_changed,vdso64ld)
2007-10-03 00:30:04 +04:00
# strip rule for the .so file
$(obj)/%.so : OBJCOPYFLAGS := -S
$(obj)/%.so : $( obj ) /%.so .dbg FORCE
$( call if_changed,objcopy)
2005-04-17 02:20:36 +04:00
# assembly rules for the .S files
2016-08-09 15:17:29 +03:00
$(obj-vdso64) : %.o : %.S FORCE
2005-04-17 02:20:36 +04:00
$( call if_changed_dep,vdso64as)
# actual build commands
quiet_cmd_vdso64ld = VDSO64L $@
2016-08-09 15:17:29 +03:00
cmd_vdso64ld = $( CC) $( c_flags) -o $@ -Wl,-T$( filter %.lds,$^) $( filter %.o,$^)
2005-04-17 02:20:36 +04:00
quiet_cmd_vdso64as = VDSO64A $@
cmd_vdso64as = $( CC) $( a_flags) -c -o $@ $<
2007-10-03 00:30:04 +04:00
# install commands for the unstripped file
quiet_cmd_vdso_install = INSTALL $@
cmd_vdso_install = cp $( obj) /$@ .dbg $( MODLIB) /vdso/$@
vdso64.so : $( obj ) /vdso 64.so .dbg
@mkdir -p $( MODLIB) /vdso
$( call cmd,vdso_install)
2005-04-17 02:20:36 +04:00
2007-10-03 00:30:04 +04:00
vdso_install : vdso 64.so