I am using objcopy to copy binary data directly into an object file for linking into my executable. I do this under Linux without issue using the following command.
objcopy --input-target=binary --binary-architecture=i386 --output-target=elf32-i386 <binary_input_file> <output_object_file> Under OSX 10.5 I changed the output target to mach-o-le and I get the following assertion: BFD: BFD (GNU Binutils) 2.19 assertion fail mach-o.c:166 I am using an Intel based mac and the fink distro of binutils so just to be sure I downloaded the 2.19.1 source and compiled. This issue occurs at the same location. I had look at the source but due to lack of familiarity with the code-base was reluctant to do a change. Anyhow I gave it a go and changed the code to return TRUE instead of asserting (not sure of the correct logic) but when I ran "objdump -t" on the output target it displayed "File format not recognized." -- Summary: Objcopy asserts when copying binary input target to a mach-o-le output target Product: binutils Version: 2.19 Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: pglendenning at solidra dot com CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=10222 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils