riscv: Prepare EFI header for relocatable kernels
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Wed, 29 Mar 2023 04:53:24 +0000 (06:53 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 19 Apr 2023 14:46:28 +0000 (07:46 -0700)
commit55de1e4ad43b375566162ae0cc2b56dfa44aae4e
tree87f30571e30f051787312341dd87080b86156792
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6
riscv: Prepare EFI header for relocatable kernels

ld does not handle relocations correctly as explained here [1],
a fix for that was proposed by Nelson there but we have to support older
toolchains and then provide this fix.

Note that llvm does not need this fix and is then excluded.

[1] https://sourceware.org/pipermail/binutils/2023-March/126690.html

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230329045329.64565-2-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/set_memory.h
arch/riscv/kernel/efi-header.S
arch/riscv/kernel/vmlinux.lds.S