Boot: Unify the ELF and DOL code paths

They're essentially the same. To achieve this, this commit unifies
DolReader and ElfReader into a common interface for boot executable
readers, so the only remaining difference between ELF and DOL is
how which volume is inserted.
This commit is contained in:
Léo Lam
2017-05-28 17:12:38 +02:00
parent 22992ae41e
commit 065261dbad
13 changed files with 195 additions and 233 deletions

View File

@ -134,8 +134,7 @@ bool Load()
return false;
}
std::vector<u8> elf_bytes = mios.GetElf();
ElfReader elf{elf_bytes.data()};
ElfReader elf{mios.GetElf()};
if (!elf.LoadIntoMemory(true))
{
PanicAlertT("Failed to load MIOS ELF into memory.");