linux/arch/x86/entry
Nathan Chancellor 86e28ed25b x86/vdso: Conditionally export __vdso_sgx_enter_enclave()
commit 45be2ad007 upstream.

Recently, ld.lld moved from '--undefined-version' to
'--no-undefined-version' as the default, which breaks building the vDSO
when CONFIG_X86_SGX is not set:

  ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined

__vdso_sgx_enter_enclave is only included in the vDSO when
CONFIG_X86_SGX is set. Only export it if it will be present in the final
object, which clears up the error.

Fixes: 8466436952 ("x86/vdso: Implement a vDSO for Intel SGX enclave call")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1756
Link: https://lore.kernel.org/r/20221109000306.1407357-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2022-12-19 12:36:38 +01:00
..
syscalls compat: remove some compat entry points 2021-09-08 15:32:35 -07:00
vdso x86/vdso: Conditionally export __vdso_sgx_enter_enclave() 2022-12-19 12:36:38 +01:00
vsyscall x86/vsyscall_emu/64: Don't use RET in vsyscall emulation 2022-07-23 12:54:00 +02:00
calling.h x86/retbleed: Add fine grained Kconfig knobs 2022-07-23 12:54:10 +02:00
common.c X86 entry code related updates: 2021-06-29 12:44:51 -07:00
entry.S x86/bugs: Add retbleed=ibpb 2022-07-23 12:54:05 +02:00
entry_32.S x86/entry_32: Fix segment exceptions 2022-07-29 17:25:33 +02:00
entry_64.S x86/entry: Move CLD to the start of the idtentry macro 2022-08-31 17:16:34 +02:00
entry_64_compat.S objtool: Add entry UNRET validation 2022-07-23 12:54:06 +02:00
Makefile x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-17 14:24:15 +02:00
syscall_32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_64.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_x32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
thunk_32.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-17 14:24:15 +02:00
thunk_64.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-17 14:24:15 +02:00