ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
atexit_stubs.cpp
Go to the documentation of this file.
1/*
2 * Linker wrap stub for __cxa_atexit().
3 *
4 * GCC registers the destructor of every global and function local static
5 * object with __cxa_atexit(). The firmware never returns from main or calls
6 * exit(), so these destructors never run, but the first registration links
7 * newlib's exit handler tables.
8 */
9
11
12#ifdef USE_LIBRETINY
13
15
16// NOLINTBEGIN(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
17extern "C" int __wrap___cxa_atexit(void (*)(void *), void *, void *) { return 0; }
18// NOLINTEND(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
19
20#endif // USE_LIBRETINY
int __wrap___cxa_atexit(void(*)(void *), void *, void *)