WSL2-Linux-Kernel/arch/riscv
Masahiro Yamada 596b0474d3 kbuild: preprocess module linker script
There was a request to preprocess the module linker script like we
do for the vmlinux one. (https://lkml.org/lkml/2020/8/21/512)

The difference between vmlinux.lds and module.lds is that the latter
is needed for external module builds, thus must be cleaned up by
'make mrproper' instead of 'make clean'. Also, it must be created
by 'make modules_prepare'.

You cannot put it in arch/$(SRCARCH)/kernel/, which is cleaned up by
'make clean'. I moved arch/$(SRCARCH)/kernel/module.lds to
arch/$(SRCARCH)/include/asm/module.lds.h, which is included from
scripts/module.lds.S.

scripts/module.lds is fine because 'make clean' keeps all the
build artifacts under scripts/.

You can add arch-specific sections in <asm/module.lds.h>.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Jessica Yu <jeyu@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Jessica Yu <jeyu@kernel.org>
2020-09-25 00:36:41 +09:00
..
boot riscv: Allow building with kcov coverage 2020-07-30 11:37:35 -07:00
configs riscv: Add SiFive drivers to rv32_defconfig 2020-08-20 11:00:21 -07:00
include kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00
kernel kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00
lib RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
mm mm/riscv: use general page fault accounting 2020-08-12 10:58:03 -07:00
net bpf, riscv: Use compressed instructions in the rv64 JIT 2020-07-21 13:26:25 -07:00
Kbuild riscv: Allow device trees to be built into the kernel 2020-05-18 11:38:05 -07:00
Kconfig RISC-V: Remove CLINT related code from timer and arch 2020-08-20 10:58:13 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs RISC-V: Remove CLINT related code from timer and arch 2020-08-20 10:58:13 -07:00
Makefile kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00