kbuild: Introduce Kconfig symbol for linking vmlinux with relocations
authorArd Biesheuvel <ardb@kernel.org>
Tue, 11 Mar 2025 11:06:19 +0000 (12:06 +0100)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 16 Mar 2025 15:29:50 +0000 (00:29 +0900)
commit9b400d17259b70d1d68585028e96b30152d0796a
treedd967c6890ffd783ee65b3b3b749c0122bb514f0
parente22bbb8e97846bfb5a6942a2322f0237ff13df0f
kbuild: Introduce Kconfig symbol for linking vmlinux with relocations

Some architectures build vmlinux with static relocations preserved, but
strip them again from the final vmlinux image. Arch specific tools
consume these static relocations in order to construct relocation tables
for KASLR.

The fact that vmlinux is created, consumed and subsequently updated goes
against the typical, declarative paradigm used by Make, which is based
on rules and dependencies. So as a first step towards cleaning this up,
introduce a Kconfig symbol to declare that the arch wants to consume the
static relocations emitted into vmlinux. This will be wired up further
in subsequent patches.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile
arch/Kconfig
arch/mips/Kconfig
arch/mips/Makefile
arch/riscv/Kconfig
arch/riscv/Makefile
arch/s390/Kconfig
arch/s390/Makefile
arch/x86/Kconfig
arch/x86/Makefile