diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-09-08 07:27:08 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2020-09-24 18:36:41 +0300 |
commit | 596b0474d3d9b1242eab713f84d8873f9887d980 (patch) | |
tree | 90679684690ff83518c12455779683ff28f01561 /arch/m68k/include/asm | |
parent | 887af6d7c99e963c6f92af8e985f9aa6f4f9eac2 (diff) | |
download | linux-596b0474d3d9b1242eab713f84d8873f9887d980.tar.xz |
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>
Diffstat (limited to 'arch/m68k/include/asm')
-rw-r--r-- | arch/m68k/include/asm/module.lds.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/module.lds.h b/arch/m68k/include/asm/module.lds.h new file mode 100644 index 000000000000..fda94fa38243 --- /dev/null +++ b/arch/m68k/include/asm/module.lds.h @@ -0,0 +1,7 @@ +SECTIONS { + .m68k_fixup : { + __start_fixup = .; + *(.m68k_fixup) + __stop_fixup = .; + } +} |