Community
Participate
Working Groups
The atexit() reference requires malloc() for the TI/EABI/ELF targets. And the TI/COFF implementation has a large static array. If app doesn't call System_exit(), the app still suffers from the data footprint for this static array.
If we remove the call to exit() from System_exit, we could still run atexitHandlers in a loop in System_exit, instead of relying on exit() to call System_rtsExit(), where the loop is currently run. However, CCS automatically sets a breakpoint at C$$EXIT, and if we don't call exit() we will not hit that code. SYS/BIOS regressions rely on the tests hitting C$$EXIT, but they could be changed to set a breakpoint at System_exit. Karl thinks that this bug raises too many small issues, and we should probably postpone it.
The usage of exit() and abort() in System module is now configurable. The System Module contains configurable variables which can be set to point to user defined abort() and exit() implementation to avoid the large footprint from C Standard APIs. This allows backward compatibility though atexit() is no longer used. The atexit() was used to connect the System_atexit()'s to atexit() so that all functions bound via atexit() or System_atexit() were processed when exit() or System_exit(). Now, it users responsibility to connect the System_atexit() to atexit(). This has been fixed in xdc-A03
verified by code review. also verified the .map file for a few .out files and atexit() is gone. verify pass.
- shipped in 3.30.0