[Concept,11/15] riscv: Skip prelink-riscv for EFI application builds

Message ID 20260212001410.1919749-12-sjg@u-boot.org
State New
Headers
Series riscv: Add EFI-application support |

Commit Message

Simon Glass Feb. 12, 2026, 12:14 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

prelink-riscv processes static-PIE relocations in the U-Boot binary,
but EFI applications are built as shared objects with dynamic
relocations handled by the EFI CRT0. Running prelink-riscv on an EFI
app binary fails.

Skip the prelink-riscv step when CONFIG_EFI_APP is set.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 Makefile | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/Makefile b/Makefile
index ee5b54c4c51..a446e634a7f 100644
--- a/Makefile
+++ b/Makefile
@@ -1864,8 +1864,10 @@  ifeq ($(CONFIG_KALLSYMS),y)
 endif
 	$(call cmd,llcheck,u-boot)
 ifeq ($(CONFIG_RISCV),y)
+ifneq ($(CONFIG_EFI_APP),y)
 	@tools/prelink-riscv $@
 endif
+endif
 
 # Common step: create archive and prepare modified object files
 quiet_cmd_ulib-objs = OBJS    $@