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
Unknown Object (File)
Sun, Jun 1, 11:48 AM
Unknown Object (File)
Wed, May 28, 11:41 AM
Unknown Object (File)
Mon, May 26, 7:03 PM
Unknown Object (File)
Sun, May 18, 9:01 PM
Unknown Object (File)
Mon, May 5, 2:31 PM
Unknown Object (File)
Apr 17 2025, 2:46 AM
Unknown Object (File)
Apr 15 2025, 1:39 AM
Unknown Object (File)
Apr 14 2025, 10:55 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