[PATCH] scripts: Introduce ARCH_WANTS_RELA_DYN to avoid stripping .rela.dyn section
Björn Töpel
bjorn at kernel.org
Fri Mar 28 01:19:34 PDT 2025
Alexandre Ghiti <alexghiti at rivosinc.com> writes:
> riscv uses the .rela.dyn section to relocate the kernel at runtime but
> that section is stripped from vmlinux. That prevents kexec to
> successfully load vmlinux since it does not contain the relocations info
> needed.
>
> Fix this by introducing a new config ARCH_WANTS_RELA_DYN that prevents
> .rela.dyn to be stripped.
>
> Fixes: 71d815bf5dfd ("kbuild: Strip runtime const RELA sections correctly")
> Signed-off-by: Alexandre Ghiti <alexghiti at rivosinc.com>
Thanks, Alex! This fix makes it possible to kexec into RISC-V vmlinux w/
CONFIG_RELOCATABLE.
Tested-by: Björn Töpel <bjorn at rivosinc.com>
Reviewed-by: Björn Töpel <bjorn at rivosinc.com>
More information about the linux-riscv
mailing list