From: Peter Collingbourne Date: Wed, 7 Nov 2018 00:39:13 +0000 (-0800) Subject: FROMLIST: arm64: Build vDSO with -ffixed-x18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf5f41574cf000a2a40a87e3953b2f119c9415ca;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git FROMLIST: arm64: Build vDSO with -ffixed-x18 The vDSO needs to be build with x18 reserved in order to accommodate userspace platform ABIs built on top of Linux that use the register to carry inter-procedural state, as provided for by the AAPCS. An example of such a platform ABI is the one that will be used by an upcoming version of Android. Although this change is currently a no-op due to the fact that the vDSO is currently implemented in pure assembly on arm64, it is necessary in order to prepare for another change [1] that will add C code to the vDSO. [1] https://patchwork.kernel.org/patch/10044501/ Change-Id: Icaac4b1c9127d81d754d3b8688274e9afc781760 Signed-off-by: Peter Collingbourne Signed-off-by: Vincenzo Frascino Cc: Mark Salyzyn Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org --- diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index 0e3500bdace2..1e47df823e8c 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -15,7 +15,7 @@ obj-vdso-c := $(addprefix $(obj)/, $(obj-vdso-c)) obj-vdso := $(obj-vdso-c) $(obj-vdso-s) ccflags-y := -shared -fno-common -fno-builtin -fno-stack-protector -ccflags-y += -DDISABLE_BRANCH_PROFILING +ccflags-y += -DDISABLE_BRANCH_PROFILING -ffixed-x18 ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \ $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) ccflags-y += $(DISABLE_LTO)