You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/09/17 15:39:02 UTC

[GitHub] mkiiskila commented on issue #1392: bugfix/c++ global constructor

mkiiskila commented on issue #1392: bugfix/c++ global constructor
URL: https://github.com/apache/mynewt-core/pull/1392#issuecomment-422066027
 
 
   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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services