]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: Support CONFIG_REMAKE_ELF
authorSamuel Holland <samuel@sholland.org>
Mon, 20 Feb 2023 06:02:39 +0000 (00:02 -0600)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 20 Apr 2023 12:45:08 +0000 (20:45 +0800)
Add flags to tell objcopy what kind of ELF to create.

Signed-off-by: Samuel Holland <samuel@sholland.org>
arch/riscv/config.mk

index f74c3f37e63dea8542a4787056a16936e0ada21c..9cf2aef0a41589eef4980fd01165126a246918cd 100644 (file)
 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