ncch_container: Apply IPS patch after allocating .bss
This allows an IPS patch to edit .bss. This is useful for game patches that need to add code, as putting things in .bss allows adding new code *without* editing .code and thus without having to relocate everything.
This commit is contained in:
parent
2f7a10eeaa
commit
43d1ee6fb7
3 changed files with 26 additions and 14 deletions
|
@ -100,6 +100,9 @@ ResultStatus AppLoader_NCCH::LoadExec(std::shared_ptr<Kernel::Process>& process)
|
|||
overlay_ncch->exheader_header.codeset_info.data.num_max_pages * Memory::PAGE_SIZE +
|
||||
bss_page_size;
|
||||
|
||||
// Apply any IPS patch now that the entire codeset (including .bss) has been allocated
|
||||
overlay_ncch->ApplyIPSPatch(code);
|
||||
|
||||
codeset->entrypoint = codeset->CodeSegment().addr;
|
||||
codeset->memory = std::move(code);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue