linux/arch
Fangrui Song 63efb90030 riscv module: remove (NOLOAD)
[ Upstream commit 60210a3d86dc57ce4a76a366e7841dda746a33f7 ]

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: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:31 +02:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-09-30 10:09:26 +02:00
arc ARC: export clear_user_page() for modules 2021-09-22 12:26:45 +02:00
arm ARM: dts: spear13xx: Update SPI dma properties 2022-04-15 14:18:30 +02:00
arm64 bpf, arm64: Feed byte-offset into bpf line info 2022-04-15 14:18:14 +02:00
c6x
csky perf: Protect perf_guest_cbs with RCU 2022-01-20 09:19:18 +01:00
h8300
hexagon hexagon: export raw I/O routines for modules 2021-11-26 10:47:21 +01:00
ia64 ia64: ensure proper NUMA distance and possible map initialization 2022-03-08 19:07:48 +01:00
m68k m68k: set a default value for MEMORY_RESERVE 2021-11-17 09:48:46 +01:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-15 14:18:08 +02:00
mips MIPS: RB532: fix return value of __setup handler 2022-04-15 14:18:16 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 08:46:48 +02:00
nios2 uaccess: fix nios2 and microblaze get_user_8() 2022-04-15 14:18:08 +02:00
openrisc openrisc: don't printk() unconditionally 2021-09-22 12:26:24 +02:00
parisc parisc/unaligned: Fix ldw() and stw() unalignment handlers 2022-03-02 11:41:01 +01:00
powerpc powerpc/kasan: Fix early region not updated correctly 2022-04-15 14:18:29 +02:00
riscv riscv module: remove (NOLOAD) 2022-04-15 14:18:31 +02:00
s390 s390/hypfs: include z/VM guests with access control group set 2022-02-01 17:24:33 +01:00
sh sh: define __BIG_ENDIAN for math-emu 2021-11-26 10:47:17 +01:00
sparc sparc64: fix pci_iounmap() when CONFIG_PCI is not set 2021-10-09 14:39:49 +02:00
um um: Fix uml_mconsole stop/go 2022-04-15 14:18:31 +02:00
unicore32
x86 KVM: x86: Forbid VMM to set SYNIC/STIMER MSRs when SynIC wasn't activated 2022-04-15 14:18:31 +02:00
xtensa xtensa: fix xtensa_wsr always writing 0 2022-04-15 14:18:03 +02:00
.gitignore
Kconfig