Issue 120544
Summary llvm-objcopy doesn't support -O default
Labels new issue
Assignees
Reporter stsp
    With GNU objcopy you can
convert binary files to the native
arch by using `-I binary -O default`.
But llvm-objcopy doesn't understand
`-O default`.
I tried the linker trick instead, which
is to do:
`ld -r -b binary -o data.o data.txt`
as suggested here:
https://stackoverflow.com/questions/5381254/whats-the-correct-way-to-determine-target-and-architecture-for-gnu-binutils

This works with ld.bfd, but is rejected
by ld.lld. So with llvm tools I've found
no way of achiving this simple task.
For compatibility with GNU objcopy it
would be very nice to support "-O default".
Also see this discussion:
https://github.com/rui314/mold/issues/162#issuecomment-2552723377
And this blog:
https://tratt.net/laurie/blog/2022/whats_the_most_portable_way_to_include_binary_blobs_in_an_executable.html
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to