Files
linux/arch/riscv/kernel
Nathan Chancellor e6d1562dd4 riscv: vmlinux.lds.S: Explicitly handle '.got' section
This patch is for linux-6.3.y only, it has no direct mainline
equivalent.

LLVM 17 will now use the GOT for extern weak symbols when using the
medany model, which causes a linker orphan section warning on
linux-6.3.y:

  ld.lld: warning: <internal>:(.got) is being placed in '.got'

This is not an issue in mainline because handling of the .got section
was added by commit 39b3307294 ("riscv: Introduce CONFIG_RELOCATABLE")
and further extended by commit 26e7aacb83 ("riscv: Allow to downgrade
paging mode from the command line") in 6.4-rc1. Neither of these changes
are suitable for stable, so add explicit handling of the .got section in
a standalone change to align 6.3 and mainline, which addresses the
warning.

This is only an issue for 6.3 because commit f4b71bff8d ("riscv:
select ARCH_WANT_LD_ORPHAN_WARN for !XIP_KERNEL") landed in 6.3-rc1, so
earlier releases will not see this warning because it will not be
enabled.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1865
Link: a178ba9fbd
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:48:25 +02:00
..
2023-02-21 17:21:21 -08:00
2020-06-09 19:11:24 -07:00
2022-12-29 06:59:47 -08:00
2022-12-02 10:04:37 -08:00
2022-05-19 19:30:30 +02:00
2021-01-07 19:00:50 -08:00