mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Update elfSize to uncompressed elf size when needed. Fixes infinite loading in Wipeout.
Also minor cleanups.
This commit is contained in:
parent
470edac18a
commit
6833589e38
@ -401,9 +401,6 @@ int ElfReader::LoadInto(u32 loadAddress, bool fromTop)
|
||||
|
||||
// e_ident[EI_VERSION] is ignored
|
||||
|
||||
sectionOffsets = new u32[GetNumSections()];
|
||||
sectionAddrs = new u32[GetNumSections()];
|
||||
|
||||
// Should we relocate?
|
||||
bRelocate = (header->e_type != ET_EXEC);
|
||||
|
||||
@ -513,6 +510,9 @@ int ElfReader::LoadInto(u32 loadAddress, bool fromTop)
|
||||
|
||||
DEBUG_LOG(LOADER,"%i sections:", header->e_shnum);
|
||||
|
||||
sectionOffsets = new u32[GetNumSections()];
|
||||
sectionAddrs = new u32[GetNumSections()];
|
||||
|
||||
for (int i = 0; i < GetNumSections(); i++)
|
||||
{
|
||||
const Elf32_Shdr *s = §ions[i];
|
||||
|
@ -154,7 +154,7 @@ private:
|
||||
u32 entryPoint = 0;
|
||||
u32 totalSize = 0;
|
||||
u32 vaddr = 0;
|
||||
u32 segmentVAddr[32];
|
||||
u32 segmentVAddr[32]{};
|
||||
size_t size_ = 0;
|
||||
u32 firstSegAlign = 0;
|
||||
};
|
||||
|
@ -1198,6 +1198,7 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
|
||||
}
|
||||
const auto maxElfSize = std::max(head->elf_size, head->psp_size);
|
||||
newptr = new u8[maxElfSize];
|
||||
elfSize = maxElfSize;
|
||||
ptr = newptr;
|
||||
magicPtr = (u32_le *)ptr;
|
||||
int ret = pspDecryptPRX(in, (u8*)ptr, head->psp_size);
|
||||
|
Loading…
Reference in New Issue
Block a user