Boot/ElfReader: Log to BOOT log instead of MASTER log

This commit is contained in:
Pokechu22 2022-07-29 12:18:05 -07:00
parent 7a7a3a7f41
commit e97ad90681
1 changed files with 5 additions and 6 deletions

View File

@ -125,7 +125,7 @@ const char* ElfReader::GetSectionName(int section) const
// This is just a simple elf loader, good enough to load elfs generated by devkitPPC
bool ElfReader::LoadIntoMemory(bool only_in_mem1) const
{
INFO_LOG_FMT(MASTER_LOG, "String section: {}", header->e_shstrndx);
INFO_LOG_FMT(BOOT, "String section: {}", header->e_shstrndx);
if (bRelocate)
{
@ -133,14 +133,14 @@ bool ElfReader::LoadIntoMemory(bool only_in_mem1) const
return false;
}
INFO_LOG_FMT(MASTER_LOG, "{} segments:", header->e_phnum);
INFO_LOG_FMT(BOOT, "{} segments:", header->e_phnum);
// Copy segments into ram.
for (int i = 0; i < header->e_phnum; i++)
{
Elf32_Phdr* p = segments + i;
INFO_LOG_FMT(MASTER_LOG, "Type: {} Vaddr: {:08x} Filesz: {} Memsz: {}", p->p_type, p->p_vaddr,
INFO_LOG_FMT(BOOT, "Type: {} Vaddr: {:08x} Filesz: {} Memsz: {}", p->p_type, p->p_vaddr,
p->p_filesz, p->p_memsz);
if (p->p_type == PT_LOAD)
@ -157,12 +157,11 @@ bool ElfReader::LoadIntoMemory(bool only_in_mem1) const
if (srcSize < dstSize)
Memory::Memset(writeAddr + srcSize, 0, dstSize - srcSize); // zero out bss
INFO_LOG_FMT(MASTER_LOG, "Loadable Segment Copied to {:08x}, size {:08x}", writeAddr,
p->p_memsz);
INFO_LOG_FMT(BOOT, "Loadable Segment Copied to {:08x}, size {:08x}", writeAddr, p->p_memsz);
}
}
INFO_LOG_FMT(MASTER_LOG, "Done loading.");
INFO_LOG_FMT(BOOT, "Done loading.");
return true;
}