Skip to content

Conversation

@bluca
Copy link
Contributor

@bluca bluca commented Jan 6, 2026

With the new binutils which is in development and in Fedora Rawhide:

objcopy -D -j .text -j .sdata -j .data -j .data.ident \
        -j .dynamic -j .rodata -j .rel* \
        -j .rela* -j .dyn -j .reloc -j .eh_frame \
        -j .vendor_cert -j .sbat -j .sbatlevel \
        --file-alignment 0x1000 \
        --target efi-app-x86_64 fbx64.so fbx64.efi
objcopy: fbx64.so: file format not recognized

It seems it was an intentional compat break, according to the upstream commit:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5e83077d552ed6f81dbc092eb3ccf827a43de42c

Internal changes to plugin support, and stricter target checking may result in some errors being exposed in user options passed to the various binutils. For example objcopy --target=TARGET now will only work if the input file is for TARGET whereas prior versions of objcopy accepted other target input files and produced a TARGET output. If you do in fact want the old behaviour the correct usage is objcopy --output-target=TARGET.

Switch from --taget to --output-target as suggested.

With the new binutils which is in development and in Fedora Rawhide:

objcopy -D -j .text -j .sdata -j .data -j .data.ident \
        -j .dynamic -j .rodata -j .rel* \
        -j .rela* -j .dyn -j .reloc -j .eh_frame \
        -j .vendor_cert -j .sbat -j .sbatlevel \
        --file-alignment 0x1000 \
        --target efi-app-x86_64 fbx64.so fbx64.efi
objcopy: fbx64.so: file format not recognized

It seems it was an intentional compat break, according to the upstream
commit:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5e83077d552ed6f81dbc092eb3ccf827a43de42c

* Internal changes to plugin support, and stricter target checking may result
  in some errors being exposed in user options passed to the various binutils.
  For example objcopy --target=TARGET now will only work if the input file is
  for TARGET whereas prior versions of objcopy accepted other target input
  files and produced a TARGET output.  If you do in fact want the old
  behaviour the correct usage is objcopy --output-target=TARGET.

Switch from --taget to --output-target as suggested.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
@vathpela vathpela merged commit c4665d2 into rhboot:main Jan 8, 2026
68 of 99 checks passed
@bluca bluca deleted the binutils_fix branch January 8, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants