[PATCH] riscv: Support CONFIG_REMAKE_ELF

Samuel Holland samuel at sholland.org
Mon Feb 20 07:02:39 CET 2023


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

Signed-off-by: Samuel Holland <samuel at sholland.org>
---

 arch/riscv/config.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index a8ed3faf28c..e5f4af22bcb 100644
--- a/arch/riscv/config.mk
+++ b/arch/riscv/config.mk
@@ -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
-- 
2.39.2



More information about the U-Boot mailing list