mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:35:12 +01:00
Correct an NSO loader bug and use the correct address space extents
This commit is contained in:
parent
17feb68eb5
commit
31efb5e930
@ -33,8 +33,8 @@ namespace skyline::kernel {
|
||||
}
|
||||
|
||||
chunks = {ChunkDescriptor{
|
||||
.ptr = reinterpret_cast<u8 *>(base.address),
|
||||
.size = base.size,
|
||||
.ptr = reinterpret_cast<u8 *>(addressSpace.address),
|
||||
.size = addressSpace.size,
|
||||
.state = memory::states::Unmapped,
|
||||
}};
|
||||
}
|
||||
|
@ -41,11 +41,11 @@ namespace skyline::loader {
|
||||
nsoExecutable.text.contents.resize(util::AlignUp(nsoExecutable.text.contents.size(), PAGE_SIZE));
|
||||
nsoExecutable.text.offset = header.text.memoryOffset;
|
||||
|
||||
nsoExecutable.ro.contents = GetSegment(backing, header.ro, header.flags.textCompressed ? header.textCompressedSize : 0);
|
||||
nsoExecutable.ro.contents = GetSegment(backing, header.ro, header.flags.roCompressed ? header.roCompressedSize : 0);
|
||||
nsoExecutable.ro.contents.resize(util::AlignUp(nsoExecutable.ro.contents.size(), PAGE_SIZE));
|
||||
nsoExecutable.ro.offset = header.ro.memoryOffset;
|
||||
|
||||
nsoExecutable.data.contents = GetSegment(backing, header.data, header.flags.textCompressed ? header.textCompressedSize : 0);
|
||||
nsoExecutable.data.contents = GetSegment(backing, header.data, header.flags.dataCompressed ? header.dataCompressedSize : 0);
|
||||
nsoExecutable.data.contents.resize(util::AlignUp(nsoExecutable.data.contents.size(), PAGE_SIZE));
|
||||
nsoExecutable.data.offset = header.data.memoryOffset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user