diff options
author | Mark Brown <broonie@kernel.org> | 2020-05-06 22:51:37 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-05-07 19:53:20 +0300 |
commit | 5e02a1887fce5108eb8ffe7957f66f3c4e0fded9 (patch) | |
tree | 66be866618671d51b03115b30db1a30c4b9ff987 /arch/arm64 | |
parent | a6aadc28278a05f394c9353460ec74610ddf7ac6 (diff) | |
download | linux-5e02a1887fce5108eb8ffe7957f66f3c4e0fded9.tar.xz |
arm64: vdso: Force the vDSO to be linked as BTI when built for BTI
When the kernel and hence vDSO are built with BTI enabled force the linker
to link the vDSO as BTI. This will cause the linker to warn if any of the
input files do not have the BTI annotation, ensuring that we don't silently
fail to provide a vDSO that is built and annotated for BTI when the
kernel is being built with BTI.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-11-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/vdso/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index dd2514bb1511..51ad1cce8133 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -17,8 +17,10 @@ obj-vdso := vgettimeofday.o note.o sigreturn.o targets := $(obj-vdso) vdso.so vdso.so.dbg obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) +btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti + ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ - --build-id -n -T + --build-id -n $(btildflags-y) -T ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING |