linux-stable/arch/riscv
Nathan Chancellor 0454ad3f63 RISC-V: vdso: Do not add missing symbols to version section in linker script
[ Upstream commit fcae44fd36 ]

Recently, ld.lld moved from '--undefined-version' to
'--no-undefined-version' as the default, which breaks the compat vDSO
build:

  ld.lld: error: version script assignment of 'LINUX_4.15' to symbol '__vdso_gettimeofday' failed: symbol not defined
  ld.lld: error: version script assignment of 'LINUX_4.15' to symbol '__vdso_clock_gettime' failed: symbol not defined
  ld.lld: error: version script assignment of 'LINUX_4.15' to symbol '__vdso_clock_getres' failed: symbol not defined

These symbols are not present in the compat vDSO or the regular vDSO for
32-bit but they are unconditionally included in the version section of
the linker script, which is prohibited with '--no-undefined-version'.

Fix this issue by only including the symbols that are actually exported
in the version section of the linker script.

Link: https://github.com/ClangBuiltLinux/linux/issues/1756
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221108171324.3377226-1-nathan@kernel.org/
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-02 17:43:02 +01:00
..
boot riscv: dts: sifive unleashed: Add PWM controlled LEDs 2022-12-02 17:42:59 +01:00
configs riscv: enable Docker requirements in defconfig 2022-07-22 13:43:28 -07:00
errata RISC-V: Clean up the Zicbom block size probing 2022-09-13 02:06:11 -07:00
include riscv: fix detection of toolchain Zihintpause support 2022-11-04 00:00:35 +09:00
kernel RISC-V: vdso: Do not add missing symbols to version section in linker script 2022-12-02 17:43:02 +01:00
kvm RISC-V: KVM: Fix kvm_riscv_vcpu_timer_pending() for Sstc 2022-11-04 00:00:30 +09:00
lib riscv: lib: uaccess: fix CSR_STATUS SR_SUM bit 2022-08-10 14:06:31 -07:00
mm riscv: fix reserved memory setup 2022-11-16 10:04:04 +01:00
net bpf, riscv: Support riscv jit to provide bpf_line_info 2022-06-02 16:26:01 -07:00
purgatory riscv/purgatory: Omit use of bin2c 2022-08-11 09:32:34 -07:00
Kbuild riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00
Kconfig riscv: fix detection of toolchain Zihintpause support 2022-11-04 00:00:35 +09:00
Kconfig.debug
Kconfig.erratas riscv: make t-head erratas depend on MMU 2022-09-17 01:48:22 -07:00
Kconfig.socs riscv: Kconfig: Style cleanups 2022-06-30 19:26:16 -07:00
Makefile riscv: fix detection of toolchain Zihintpause support 2022-11-04 00:00:35 +09:00