Skip to contentSkip to conversation

riscv: Support CONFIG_REMAKE_ELF

PATCH New Samuel Holland 1 participant 1 message Feb 20, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Support CONFIG_REMAKE_ELF

Add flags to tell objcopy what kind of ELF to create.

---

 arch/riscv/config.mk | 2 ++
 1 file changed, 2 insertions(+)
arch/riscv/config.mk +2 -0
index a8ed3faf28c..e5f4af22bcb 100644
@@ -16,11 +16,13 @@
 ifdef CONFIG_32BIT
 KBUILD_LDFLAGS		+= -m $(32bit-emul)
 EFI_LDS			:= elf_riscv32_efi.lds
+PLATFORM_ELFFLAGS	+= -B riscv -O elf32-littleriscv
 endif
 
 ifdef CONFIG_64BIT
 KBUILD_LDFLAGS		+= -m $(64bit-emul)
 EFI_LDS			:= elf_riscv64_efi.lds
+PLATFORM_ELFFLAGS	+= -B riscv -O elf64-littleriscv
 endif
 
 PLATFORM_CPPFLAGS	+= -ffixed-gp -fpic
Signature · 1 line
2.39.2