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