This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compatibility between gcc-arm and ds-5 compiler

I am trying to build a static library with ARM DS-5, then link to this library from an executable which is built using GCC-arm.

I am able to build the static library with ARM-DS-5, but when I build my executable (which links to the static library) with gcc-arm, I get the following Linker error

"Object has vendor-specific contents that must be processed by the 'ARM' toolchain"

Does this mean that I have to build, both my executable and static library in ARM-DS-5 to get my use case to work?

Is the executable built with GCC-arm compatible with a library built using ARM-DS-5?

Target: Xilinx Zynq-7020 ARM

Target OS: Linux

Thank you

  • Hi sandykaus,

    We assume when you say building with "ARM DS-5" you mean with ARM Compiler 5. The difference here is that ARM Compiler is targeted at bare metal and doesn't use the interworking ABI by default. You should be able to specify:

    --apcs=/interwork

    .. to your static library build, and this will use the same ABI as GCC uses by default. There are other potential incompatibilities between the complication defaults between the compilers - it is sometimes useful to figure this out using the "fromelf" tool, specifically the options --dump_build_attributes and --decode_build_attributes. Any attributes specified which are not the same, or specified in one but not the other, cannot be merged and this is what causes the error you're seeing.

    Finding out why those attributes are specified is usually a big clue as to which option you need to pass to each compiler to ensure they build using the same ABI and CPU features.

    Ta,

    Matt Sealey