Module mod_mgmt::replace_nano_core_crates
source · Expand description
Routines for replacing the crates that comprise the nano_core
,
i.e., the base kernel image.
In loadable mode, this should be invoked to duplicitously load each one of the nano_core’s constituent crates such that other crates loaded in the future will depend on those dynamically-loaded instances rather than the statically-linked sections in the nano_core’s base kernel image.
As of now, the newly-loaded crates will still depend on (and link against) the data sections (.data and .bss) in the actual nano_core’s memory pages. I haven’t found a correct, safe way to replace those data sections yet, since the type contract of a static variable is that is a singleton instance for all eternity.
However, the non-data sections are replaced, e.g., .text, .rodata. All crates loaded in the future will depend on those newly-loaded (non-data) sections instead of their original counterparts in the nano_core.
Functions
- See the module-level documentation for how this works.