mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
x86/entry/vdso: Refactor the vdso build
- Separate out the vdso sources into common, vdso32, and vdso64 directories. - Build the 32- and 64-bit vdsos in their respective subdirectories; this greatly simplifies the build flags handling. - Unify the mangling of Makefile flags between the 32- and 64-bit vdso code as much as possible; all common rules are put in arch/x86/entry/vdso/common/Makefile.include. The remaining is very simple for 32 bits; the 64-bit one is only slightly more complicated because it contains the x32 generation rule. - Define __DISABLE_EXPORTS when building the vdso. This need seems to have been masked by different ordering compile flags before. - Change CONFIG_X86_64 to BUILD_VDSO32_64 in vdso32/system_call.S, to make it compatible with including fake_32bit_build.h. - The -fcf-protection= option was "leaking" from the kernel build, for reasons that was not clear to me. Furthermore, several distributions ship with it set to a default value other than "-fcf-protection=none". Make it match the configuration options for *user space*. Note that this patch may seem large, but the vast majority of it is simply code movement. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://patch.msgid.link/20251216212606.1325678-4-hpa@zytor.com
This commit is contained in:
committed by
Dave Hansen
parent
a76108d05e
commit
693c819fed
24
arch/x86/entry/vdso/vdso32/Makefile
Normal file
24
arch/x86/entry/vdso/vdso32/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# 32-bit vDSO images for x86.
|
||||
#
|
||||
|
||||
# The vDSOs built in this directory
|
||||
vdsos-y := 32
|
||||
|
||||
# Files to link into the vDSO:
|
||||
vobjs-y := note.o vclock_gettime.o vgetcpu.o
|
||||
vobjs-y += system_call.o sigreturn.o
|
||||
|
||||
# Compilation flags
|
||||
flags-y := -DBUILD_VDSO32 -m32 -mregparm=0
|
||||
flags-$(CONFIG_X86_64) += -include $(src)/fake_32bit_build.h
|
||||
flags-remove-y := -m64
|
||||
|
||||
# The location of this include matters!
|
||||
include $(src)/../common/Makefile.include
|
||||
|
||||
# Linker options for the vdso
|
||||
VDSO_LDFLAGS_32 := -m elf_i386 -soname linux-gate.so.1
|
||||
|
||||
$(obj)/vdso32.so.dbg: $(vobjs)
|
||||
Reference in New Issue
Block a user