Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 90fa4b6

Browse files
nathanchanceKendrenogen
authored andcommitted
MIPS: VDSO: Allow ld.lld to link the VDSO
Currently, when linking with ld.lld, this warning pops up: arch/mips/vdso/Makefile:70: MIPS VDSO requires binutils >= 2.25 CONFIG_LD_VERSION is set with scripts/ld-version.sh, which is specific to GNU ld. It returns 0 for ld.lld so CONFIG_MIPS_LD_CAN_LINK_VDSO does not set. ld.lld has a completely different versioning scheme (as it follows LLVM's versioning) and it does not have the issue mentioned in the comment block so it should be allowed to link the VDSO. With this patch, the VDSO successfully links and shows P_MIPS_PC32 in vgettimeofday.o. $ llvm-objdump -Dr arch/mips/vdso/vgettimeofday.o | grep R_MIPS_PC32 00000024: R_MIPS_PC32 _start 000000b0: R_MIPS_PC32 _start 000002bc: R_MIPS_PC32 _start 0000036c: R_MIPS_PC32 _start 00000468: R_MIPS_PC32 _start Reported-by: Dmitry Golovin <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Link: ClangBuiltLinux/linux#785 Link: llvm/llvm-project@e364e2e Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 0e77b42 commit 90fa4b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/vdso/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# the lack of relocations. As such, we disable the VDSO for microMIPS builds.
1313

1414
config MIPS_LD_CAN_LINK_VDSO
15-
def_bool LD_VERSION >= 225000000
15+
def_bool LD_VERSION >= 225000000 || LD_IS_LLD
1616

1717
config MIPS_DISABLE_VDSO
1818
def_bool CPU_MICROMIPS || (!CPU_MIPSR6 && !MIPS_LD_CAN_LINK_VDSO)

0 commit comments

Comments
 (0)