mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +00:00
Loader: Properly map BSS as rw.
This commit is contained in:
parent
3e36e81e80
commit
678bf5914a
1 changed files with 3 additions and 0 deletions
|
@ -268,6 +268,9 @@ Result NsoUtils::LoadNsosIntoProcessMemory(Handle process_h, u64 title_id, NsoLo
|
||||||
|
|
||||||
for (unsigned int seg = 0; seg < 3; seg++) {
|
for (unsigned int seg = 0; seg < 3; seg++) {
|
||||||
u64 size = g_nso_headers[i].segments[seg].decomp_size;
|
u64 size = g_nso_headers[i].segments[seg].decomp_size;
|
||||||
|
if (seg == 2) {
|
||||||
|
size += g_nso_headers[i].segments[2].align_or_total_size;
|
||||||
|
}
|
||||||
size += 0xFFF;
|
size += 0xFFF;
|
||||||
size &= ~0xFFFULL;
|
size &= ~0xFFFULL;
|
||||||
const static unsigned int segment_perms[3] = {5, 1, 3};
|
const static unsigned int segment_perms[3] = {5, 1, 3};
|
||||||
|
|
Loading…
Reference in a new issue