linux-stable/arch/riscv
Fangrui Song 559ea0f38b riscv module: remove (NOLOAD)
commit 60210a3d86 upstream.

On ELF, (NOLOAD) sets the section type to SHT_NOBITS[1]. It is conceptually
inappropriate for .plt, .got, and .got.plt sections which are always
SHT_PROGBITS.

In GNU ld, if PLT entries are needed, .plt will be SHT_PROGBITS anyway
and (NOLOAD) will be essentially ignored. In ld.lld, since
https://reviews.llvm.org/D118840 ("[ELF] Support (TYPE=<value>) to
customize the output section type"), ld.lld will report a `section type
mismatch` error (later changed to a warning). Just remove (NOLOAD) to
fix the warning.

[1] https://lld.llvm.org/ELF/linker_script.html As of today, "The
section should be marked as not loadable" on
https://sourceware.org/binutils/docs/ld/Output-Section-Type.html is
outdated for ELF.

Link: https://github.com/ClangBuiltLinux/linux/issues/1597
Fixes: ab1ef68e54 ("RISC-V: Add sections of PLT and GOT for kernel module")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Fangrui Song <maskray@google.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 13:58:57 +02:00
..
boot riscv: dts: canaan: Fix SPI3 bus width 2022-04-08 13:57:20 +02:00
configs riscv: fix nommu_k210_sdcard_defconfig 2022-02-24 19:22:55 -08:00
errata riscv: errata: alternative: mark vendor_patch_func __initdata 2022-01-09 11:02:46 -08:00
include riscv module: remove (NOLOAD) 2022-04-08 13:58:57 +02:00
kernel uaccess: fix type mismatch warnings from access_ok() 2022-04-08 13:58:44 +02:00
kvm KVM/arm64 fixes for 5.17, take #2 2022-02-05 00:58:25 -05:00
lib riscv: extable: consolidate definitions 2022-01-05 17:52:47 -08:00
mm riscv: Fix kasan pud population 2022-03-03 15:34:29 -08:00
net riscv: bpf: Fix eBPF's exception tables 2022-01-19 10:50:02 -08:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig RISC-V Patches for the 5.17 Merge Window, Part 2 2022-01-22 09:34:49 +02:00
Kconfig.debug
Kconfig.erratas riscv: alternative only works on !XIP_KERNEL 2022-03-10 10:05:19 -08:00
Kconfig.socs riscv: alternative only works on !XIP_KERNEL 2022-03-10 10:05:19 -08:00
Makefile riscv: fix build with binutils 2.38 2022-02-10 09:17:01 -08:00