3 ms·
But it's not implicit and/or required. In embedded you can use C/C++ without a runtime. > calling the code that calls main(), runs functions registered on exec
by scoutt 5y ago
But it's not implicit and/or required. In embedded you can use C/C++ without a runtime.
> calling the code that calls main(), runs functions registered on executable load, registered atexit(), soft floating point emulation, running constructors/destructors on start/exit, handling exceptions, threading support.
You call main() (or whatever) from your reset handler, there is no "executable load", there is no "atexit()", floating point can be hard-instructions (if available), call __libc_init_array() to call constructors if required, you usually don't use exception handling, and of course there is no threading support.
Perhaps you can call "runtime" the instructions inserted to call constructors/destructors but I think it doesn't qualify.
- pjmlp 5y agoA runtime is everything that the compiler generates in addition to the code that is written so that it runs at all. The embedded use of C and C++ dialects rely on compiler specific extensions and are per ISO standard implementation-defined, without any guarantee of code portability as per freestanding definition.