Open
Description
In FreeBSD we build our UEFI loader by linking an ELF object, and using ELF Tool Chain's objcopy to convert that to a PE EFI binary, using --output-target=efi-app-x86_64
.
Invocation:
SOURCE_DATE_EPOCH=1451606400 objcopy \
-j .peheader -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel.dyn -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
-j set_Xlua_compile_set \
--output-target=efi-app-x86_64 \
loader_lua.sym loader_lua.efi`
Gentoo Linux encountered a similar issue, building app-crypt/sbsigntools: https://bugs.gentoo.org/733016
We are working on migrating to LLVM binutils replacements, and this is one issue that's a dependency of that change.
Related FreeBSD bugs: