[PATCH] RISC-V: kexec: Define arch_kexec_apply_relocations_add

Palmer Dabbelt palmer at rivosinc.com
Mon May 30 11:04:09 PDT 2022


3e35142ef99f ("kexec_file: drop weak attribute from
arch_kexec_apply_relocations[_add]") converts
arch_kexec_apply_relocations_add() from weak to ifdef, which landed
while 838b3e28488f ("RISC-V: Load purgatory in kexec_file") was in a
different tree.  This converts the RISC-V port over to an ifdef
override.

Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file")
Signed-off-by: Palmer Dabbelt <palmer at rivosinc.com>
---
 arch/riscv/include/asm/kexec.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/riscv/include/asm/kexec.h b/arch/riscv/include/asm/kexec.h
index 206217b23301..a38769d50a80 100644
--- a/arch/riscv/include/asm/kexec.h
+++ b/arch/riscv/include/asm/kexec.h
@@ -55,6 +55,14 @@ extern riscv_kexec_method riscv_kexec_norelocate;
 
 #ifdef CONFIG_KEXEC_FILE
 extern const struct kexec_file_ops elf_kexec_ops;
+
+struct purgatory_info;
+int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
+				     Elf_Shdr *section,
+				     const Elf_Shdr *relsec,
+				     const Elf_Shdr *symtab);
+#define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add
 #endif
 
+
 #endif
-- 
2.34.1




More information about the linux-riscv mailing list