Function mod_mgmt::parse_nano_core::parse_nano_core
source · pub fn parse_nano_core(
namespace: &Arc<CrateNamespace>,
text_pages: MappedPages,
rodata_pages: MappedPages,
data_pages: MappedPages,
verbose_log: bool
) -> Result<NanoCoreItems, (&'static str, NoDrop<[Arc<Mutex<MappedPages>>; 3]>)>Expand description
Parses and/or deserializes the file containing details about the already loaded
(and currently running) nano_core code.
Basically, just searches for global (public) symbols, which are added to the system map and the crate metadata.
We consider both GLOBAL and WEAK symbols to be global public symbols; this is necessary because symbols that are
compiler builtins, such as memset, memcpy, etc, are symbols with weak linkage in newer versions of Rust (2021 and later).
Return
- If successful, this returns the set of important
NanoCoreItems. - If an error occurs, the returned
Result::Errcontains the passed-intext_pages,rodata_pages, anddata_pages, wrapped in [NoDrop] in order to avoid prematurely/accidentally dropping them, which would cause endless exceptions.