[PATCH] x86: efi: fix objcopy flags for barebox.efi

corentin.guillevic at smile.fr corentin.guillevic at smile.fr
Wed Apr 29 01:07:11 PDT 2026


From: Corentin Guillevic <corentin.guillevic at smile.fr>

Since the 2.46 version of binutils, a stricter target checking has been added
(see [1]) meaning that the --target=efi-app-x86_64 option no longer works:
a 'file format not recognized' error occurs.

Replace the --target option, which defines both the input and output targets,
with --output-target.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5e83077d552ed6f81dbc092eb3ccf827a43de42c

Signed-off-by: Corentin Guillevic <corentin.guillevic at smile.fr>
---
 arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 647d075f016..9456815fa8a 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -62,7 +62,7 @@ KBUILD_LDFLAGS := --no-undefined
 
 OBJCOPYFLAGS_barebox.efi = \
 	-j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela \
-	-j .reloc -j .bbenv.* -j .bblogo.* -j .barebox_imd --target=$(TARGET)
+	-j .reloc -j .bbenv.* -j .bblogo.* -j .barebox_imd --output-target=$(TARGET)
 
 barebox.efi: $(KBUILD_BINARY) FORCE
 	$(call if_changed,objcopy)
-- 
2.51.0




More information about the barebox mailing list