News for hackers. Stuff that matters.
Re:Embedding files in C programs with koio by planteen on Wednesday May 30, 2018 @05:46PM (#17192149)
You are just dealing with ELF files, so objcopy works fine in those scenarios as long as the architecture matches for the linker. This trick works many other compilers that use ELF such as clang, MSVC, Green Hills, etc.
Re:Embedding files in C programs with koio by tetromino_ on Wednesday May 30, 2018 @06:12PM (#17192357)
Except that MacOS does not use ELF, it uses Mach-O.
Re:Embedding files in C programs with koio by planteen on Wednesday May 30, 2018 @07:19PM (#17192735)
Clang handles intermediate ELF object files fine and can link into a Mach-O final executable.

Windows under MSVC doesn't use ELF either (it uses PE for the .EXE) and it links in intermediate ELF object files fine. I've made an EXE that was a mix of files compiled by MSVC and GCC.