MCU startup code does various things. Calling __libc_init_array() would be done 
by BSPs/MCUs which expect to link against newlib, as that's who has this as the 
C++ global constructor hook.
libc_init_array() implementation also expects things from the linker script, so 
you might want to be on lookout for those. Note that some (most?) startup code 
in mynewt does not call this function.

The most common tool installation probably has happened using the instructions 
we have on the mynewt pages for getting the compiler for ARM. This installation 
comes with gcc which has newlib available also. So any symbol not found from 
baselibc, and referenced by rest of the code, is brought in from newlib.

I'm ok bringing this in; people whose build this will break are the ones who 
have startup code which calls __libc_init_array(), but who don't have newlib 
available for linking.
I.e. who built gcc without newlib, using BSP which uses startup code which 
calls this. So there might be some broken builds as a result.
PIC32 should be fine, as it doesn't call libc_init_array.

[ Full content available at: https://github.com/apache/mynewt-core/pull/1392 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to