Page MenuHomeFreeBSD

objcopy: Always use ELF Tool Chain objcopy for EFI builds
ClosedPublic

Authored by emaste on Mar 14 2025, 4:46 PM.
Tags
None
Referenced Files
F157066331: D49362.id152275.diff
Mon, May 18, 6:04 AM
F157057063: D49362.diff
Mon, May 18, 4:43 AM
F157057044: D49362.diff
Mon, May 18, 4:43 AM
F156992932: D49362.diff
Sun, May 17, 8:44 PM
F156986004: D49362.id152726.diff
Sun, May 17, 7:46 PM
F156986000: D49362.id152726.diff
Sun, May 17, 7:46 PM
F156983594: D49362.id152726.diff
Sun, May 17, 7:21 PM
Unknown Object (File)
Fri, May 15, 7:23 PM

Details

Summary
It is required as part of our EFI object build process, as llvm-objcopy
does not support efi-app-x86_64 and similar ouptut (for more detail
see https://github.com/llvm/llvm-project/issues/108609).

PR:             280771

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

We could always install it as elftc-objcopy and add LINKS+= ${BINDIR}/${PROG} ${BINDIR}/objcopy in the MK_LLVM_OBJCOPY=no case and set EFI_OBJCOPY?= elftc-objcopy always; reviewers let me know if you think that's preferable/simpler.

Will also need an addition to ObsoleteFiles.inc/OptionalObsoleteFiles.inc.

mpysw_vip.163.com added inline comments.
stand/efi/Makefile.inc
30

Let's use its original name, elfcopy

add OptionalObsoleteFiles.inc

tools/build/mk/OptionalObsoleteFiles.inc
8128

these shouldn't be conditional on LLVM_BINUTILS, will remove locally

Will you need to remove elfcopy from ObsoleteFiles.inc? (20161003: MK_ELFCOPY_AS_OBJCOPY option retired)

Remove ObsoleteFiles.inc entry

diff against correct version

We could probably switch to llvm-objcopy for loader.efi on non-x86, but that can be a followup change

This revision is now accepted and ready to land.Mar 14 2025, 7:37 PM