android_kernel_xiaomi_sm8350/arch/riscv
Nathan Chancellor dff9b25cb9 RISC-V: vdso: Do not add missing symbols to version section in linker script
[ Upstream commit fcae44fd36d052e956e69a64642fc03820968d78 ]

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-08 11:22:57 +01:00
..
boot dts: phy: fix missing mdio device and probe failure of vsc8541-01 device 2021-01-27 11:47:45 +01:00
configs riscv: defconfig: enable gpio support for HiFive Unleashed 2021-01-27 11:47:45 +01:00
include RISC-V: Make port I/O string accessors actually work 2022-10-26 13:22:15 +02:00
kernel RISC-V: vdso: Do not add missing symbols to version section in linker script 2022-12-08 11:22:57 +01:00
lib riscv: Less inefficient gcc tishift helpers (and export their symbols) 2022-06-22 14:11:24 +02:00
mm riscv: Add sfence.vma after early page table changes 2020-09-23 12:40:43 +02:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-09-15 09:47:38 +02:00
Kbuild
Kconfig riscv: topology: fix default topology reporting 2022-10-29 10:20:36 +02:00
Kconfig.debug
Kconfig.socs
Makefile riscv: Pass -mno-relax only on lld < 15.0.0 2022-10-26 13:22:15 +02:00