aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2023-02-20 00:02:39 -0600
committerLeo Yu-Chi Liang <ycliang@andestech.com>2023-04-20 20:45:08 +0800
commit04d16be55404ee07134b4171dea37eff9ad8fa5a (patch)
treeed6714dc8052f164f55e73c03b27a17ce01ac936
parent9a6569a043d336138fca857bc3140fab33a11afc (diff)
downloadu-boot-04d16be55404ee07134b4171dea37eff9ad8fa5a.zip
u-boot-04d16be55404ee07134b4171dea37eff9ad8fa5a.tar.gz
u-boot-04d16be55404ee07134b4171dea37eff9ad8fa5a.tar.bz2
riscv: Support CONFIG_REMAKE_ELF
Add flags to tell objcopy what kind of ELF to create. Signed-off-by: Samuel Holland <samuel@sholland.org>
-rw-r--r--arch/riscv/config.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index f74c3f3..9cf2aef 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