Binary files compatibility

I have a .o file generated by arm compiler and another .o file generated by gcc-arm cross compiler. While i link them together i get linker errors.

Is there any way or any tool that can be used to convert binary of one format to binary of another format so that they are compatible with each other? I am using Eclipse IDE in Windows.

What sort of link errors are you getting? Is the linker able to read both object files?

'Building target: MyMain.axf'

'Invoking: GCC C++ Linker 4.9.2 [arm-eabi]'

arm-eabi-g++.exe -L"C:MyProj\Debug" -o "MyMain.axf"  ./Main.o  -lMyProj 

c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/4.9.2/../../../../arm-eabi/bin/ld.exe: warning: C:MyProj\Debug\libMyProj.a(Source.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/4.9.2/../../../../arm-eabi/bin/ld.exe: error: C:MyProj\Debug\libMyProj.a(Source.o): Object has vendor-specific contents that must be processed by the 'ARM' toolchain

c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/4.9.2/../../../../arm-eabi/bin/ld.exe: failed to merge target specific data of file C:MyProj\Debug\libMyProj.a(Source.o)

collect2.exe: error: ld returned 1 exit status


My executable is MyMain and the library linked to it is MyProj. MyProj folder has Source.cc and Source.h files in which just a simple add function is implemented
My understanding is that you need to compile all objects with the same toolchain and the same toolchain options. I do a bit of ARM development, but I have never tried mixing toolchains. I do most of my development on GCC and Eclipse (on Linux primarily, but also on OS X and Windows). You might try asking on the GNU binutils mailing list about this.
The executable is built on gcc. I want to build the library using arm, to boost up the performance. So i have to use mixed toolchains. The library using the arm compiler and the executable using a gcc-arm cross compiler. But I haven't found any cross compiler that is compatible with the Arm DS-5 compiler.
Topic archived. No new replies allowed.