Topics

Add support for libraries targeting ARM ABI C library?


Joakim Andersson
 

There is an issue in linker compatibility between GCC and ARM Compiler 5 (not sure about 6) when it comes to linking libraries compiled with ARM compiler and libc functions.
As part of the ARM ABI there is specified some extensions to the C Library for optimized memory functions (memmove, memcpy, memset).
The ARM Compiler will add link symbols to optimized version of these functions, for example __aeabi_memset8 which is memset assuming 8 byte alignment.
For memcpy and memmove these can simply be declared as aliases, for memset the order of the arguments needs to be changed and and memclr can be implemented as a call to memset.

Would it make sense to add support for this to the minimal libc implementation in zephyr?

See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0039d/index.html for information about C Library ABI for ARM architecture.
There exists compiler switches to force ARM compiler to target non aeabi implementations of libc, so it is not strictly needed.

Best regards,
Joakim Andersson