Skip to content

Commit 45be2ad

Browse files
nathanchanceKAGA-KOKO
authored andcommitted
x86/vdso: Conditionally export __vdso_sgx_enter_enclave()
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: 8466436 ("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: ClangBuiltLinux#1756 Link: https://lore.kernel.org/r/20221109000306.1407357-1-nathan@kernel.org
1 parent cefa721 commit 45be2ad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/x86/entry/vdso/vdso.lds.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ VERSION {
2727
__vdso_time;
2828
clock_getres;
2929
__vdso_clock_getres;
30+
#ifdef CONFIG_X86_SGX
3031
__vdso_sgx_enter_enclave;
32+
#endif
3133
local: *;
3234
};
3335
}

0 commit comments

Comments
 (0)