Add pre and post hooks for C++ applications
Ahead of a stable release of the OS, add runtime hooks for C++ applications who require a list of constructors to be called before main()
, and list of destructors on any exit. The implementation comprises:
- Extending the library's
atexit()
to allow the list of registered functions to be limited only by memory (+34 static entries) - Add ctor/dtor to the language descriptor table for a more generalised solution than previously proposed; previously this used 2 special weak symbols previously used by Arm, whereas now in principle other use cases could make use of the hooks
- Run time check from client stubs that a new enough C library is present to offer these ctor/dtor facilities
- In support of this:
- Fix to closing down the I/O subsystem when a module application quits but then failed to restart it if the application restarted without an intervening module RMReInit
- Various clarifications of the static data handling, its documentation, and safety in the use of adjacent static data locations
- Reintstate some commented out RMEnsures in the stubs
- Docs from an investigation on the use of language descriptors
- Re-enable the static analysis phase