On Fri, Feb 22, 2019 at 12:24:11PM +0000, Vincenzo Frascino wrote: > diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile > index 8cd4707f832a..c904b2a9b255 100644 > --- a/arch/arm64/kernel/vdso/Makefile > +++ b/arch/arm64/kernel/vdso/Makefile > @@ -6,16 +6,31 @@ > # Heavily based on the vDSO Makefiles for other archs. > # > > -obj-vdso := gettimeofday.o note.o sigreturn.o > +# Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before > +# the inclusion of generic Makefile. > +ARCH_REL_TYPE_ABS := R_AARCH64_JUMP_SLOT|R_AARCH64_GLOB_DAT|R_AARCH64_ABS64 > +include $(srctree)/lib/vdso/Makefile > + > +obj-vdso := vgettimeofday.o note.o sigreturn.o > > # Build rules > targets := $(obj-vdso) vdso.so vdso.so.dbg > obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) > > -ccflags-y := -shared -fno-common -fno-builtin -ffixed-x18 > +ccflags-y := -shared -fno-common -fno-builtin -ffixed-x18 -fno-stack-protector > +ccflags-y += -DDISABLE_BRANCH_PROFILING > ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \ > $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) > > +VDSO_LDFLAGS := -Bsymbolic > + > +CFLAGS_REMOVE_vgettimeofday.o = -pg -Os Please use CC_FLAGS_FTRACE rather than '-pg' What said, wouldn't it be better to come up with the VDSO cflags entirely separately from what the main kernel uses? That way we're unlikely to have any surprises in future with instrumentation etc. I strongly suspect you need to disable more things here, e.g. UBSAN, KASAN, KCOV. Have you tried compiling a kernel with those features enabled? VDSO files probably also need to be marked as OBJECT_FILES_NON_STANDARD. Thanks, Mark.