]> git.baikalelectronics.ru Git - kernel.git/commitdiff
RISCV: kexec: Fix build error without CONFIG_MODULES
authorLi Zhengyu <lizhengyu3@huawei.com>
Wed, 1 Jun 2022 06:39:24 +0000 (14:39 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 14 Jul 2022 21:23:33 +0000 (14:23 -0700)
When CONFIG_MODULES is not set/enabled:

../arch/riscv/kernel/elf_kexec.c:353:9: error: unknown type name 'Elf_Rela'; did you mean 'Elf64_Rela'?
  353 |         Elf_Rela *relas;
      |         ^~~~~~~~
      |         Elf64_Rela

Replace Elf_Rela by Elf64_Rela to avoid relying on CONFIG_MODULES.

Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20220601063924.13037-1-lizhengyu3@huawei.com
Fixes: 408649770f38 ("RISC-V: Load purgatory in kexec_file")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/elf_kexec.c

index 9cb85095fd459fb5e9cea5d1d6e62e8c4b076128..0cb94992c15b32a852716ca877d95b5f14f63c6f 100644 (file)
@@ -349,7 +349,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
 {
        const char *strtab, *name, *shstrtab;
        const Elf_Shdr *sechdrs;
-       Elf_Rela *relas;
+       Elf64_Rela *relas;
        int i, r_type;
 
        /* String & section header string table */