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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user