public static unsafe void Init() { RuntimeMemory.SetupEarlyStartup(); InitializAssembly(); //Mosa.Runtime.StartUp.InitializeRuntimeMetadata(); RuntimeMemory.SetupAllocator(); ElfSections = *((ElfSections *)SysCalls.GetElfSectionsAddress()); ElfSections.Init(); }
private static void SetupOriginalKernelElf() { uint kernelElfHeaderAddr = Address.OriginalKernelElfSection; var kernelElfHeader = (ElfHeader *)kernelElfHeaderAddr; OriginalKernelElf = new ElfSections { PhyOffset = kernelElfHeaderAddr, SectionHeaderArray = (ElfSectionHeader *)(kernelElfHeaderAddr + kernelElfHeader->ShOff), SectionHeaderCount = kernelElfHeader->ShNum, StringTableSectionHeaderIndex = kernelElfHeader->ShStrNdx, }; OriginalKernelElf.Init(); }