I have a libray compiled with armclang, and I wan't to link the library to my project which
compiled with arm-none-eabi-gcc.
But when link it, following error happens:
"Object has vendor-specific contents that must be processed by the 'ARM' toolchain"
It come from some object files, which maybe use some assembler instructions specific
for armclang.
So if it is possible that disassemble the object files with fromelf tool or arm-none-eabi-objdump tools,
generate .S files, and then use the arm-none-eabi-gcc(as) tools to compile them again,
at last link them all.
Hi sword_i
I don't think it is a good idea to just remove the whole of the .ARM.attributes from your object.
The ".ARM.attributes" section can contain both "public" and "private" attributes.
The public attributes, in the 'aeabi' subsection, describe the build attributes of an object file and its compatibility to a consumer toolchain, as detailed in https://developer.arm.com/docs/ihi0045/g/addenda-to-and-errata-in-the-abi-for-the-arm-architecture-abi-2019q1-documentation
The private attributes, in the 'ARM' subsection here, can be ignored by non-Arm linkers. This is signalled by not setting the Tag_compatibility tag, which means it’s implicitly zero, which means that a linker should be free to ignore any vendor attributes that it doesn’t understand.
Arm only uses the private attributes for collusion between the Arm compiler and Arm linker to get better library selection, and so other non-Arm linkers can ignore it.
In your case, the linker is giving an error, but I suspect the linker may be behaving incorrectly.
Are you able to try a more recent version of arm-none-eabi-gcc ? For example, Version 9-2019-q4-major from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
I hope this helps to resolve the issue. If you need further assistance, please let us know the exact version of the Arm Compiler you are using (from armcc --version, or armclang --version).
Stephen