xref: /OK3568_Linux_fs/kernel/arch/mips/vdso/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# For the pre-R6 code in arch/mips/vdso/vdso.h for locating
2*4882a593Smuzhiyun# the base address of VDSO, the linker will emit a R_MIPS_PC32
3*4882a593Smuzhiyun# relocation in binutils > 2.25 but it will fail with older versions
4*4882a593Smuzhiyun# because that relocation is not supported for that symbol. As a result
5*4882a593Smuzhiyun# of which we are forced to disable the VDSO symbols when building
6*4882a593Smuzhiyun# with < 2.25 binutils on pre-R6 kernels. For more references on why we
7*4882a593Smuzhiyun# can't use other methods to get the base address of VDSO please refer to
8*4882a593Smuzhiyun# the comments on that file.
9*4882a593Smuzhiyun#
10*4882a593Smuzhiyun# GCC (at least up to version 9.2) appears to emit function calls that make use
11*4882a593Smuzhiyun# of the GOT when targeting microMIPS, which we can't use in the VDSO due to
12*4882a593Smuzhiyun# the lack of relocations. As such, we disable the VDSO for microMIPS builds.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyunconfig MIPS_LD_CAN_LINK_VDSO
15*4882a593Smuzhiyun	def_bool LD_VERSION >= 225000000 || LD_IS_LLD
16*4882a593Smuzhiyun
17*4882a593Smuzhiyunconfig MIPS_DISABLE_VDSO
18*4882a593Smuzhiyun	def_bool CPU_MICROMIPS || (!CPU_MIPSR6 && !MIPS_LD_CAN_LINK_VDSO)
19