[boot] Save size of program in its module

Init will eventually want to know the full size of the program the
bootloader passed it, so save this off in the module_program struct.
This commit is contained in:
Justin C. Miller
2021-12-23 16:51:13 -08:00
parent f250a33e9b
commit c536da7279
2 changed files with 2 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ create_module(buffer data, const program_desc &desc, bool loaded)
init::module_program *mod = g_alloc.allocate_module<init::module_program>(path_len);
mod->mod_type = init::module_type::program;
mod->base_address = reinterpret_cast<uintptr_t>(data.pointer);
mod->size = data.count;
if (loaded)
mod->mod_flags = static_cast<init::module_flags>(
static_cast<uint8_t>(mod->mod_flags) |