mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-13 17:37:48 +00:00
[core, nce] module_id cache key handling (#195)
Uses Module_id plus offset for cache key, Module_id is unique to each module. Also passes the module_id everytime new patcher is created in case the module is too big. Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/195 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: wildcard <nubieluv@gmail.com> Co-committed-by: wildcard <nubieluv@gmail.com>
This commit is contained in:
parent
33275c28d3
commit
41ffa5a342
3 changed files with 35 additions and 13 deletions
|
@ -166,9 +166,12 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
|
|||
const auto& code = codeset.CodeSegment();
|
||||
auto* patch = patches ? &patches->operator[](patch_index) : nullptr;
|
||||
if (patch && !load_into_process) {
|
||||
//Set module ID using build_id from the NSO header
|
||||
patch->SetModuleID(nso_header.build_id);
|
||||
// Patch SVCs and MRS calls in the guest code
|
||||
while (!patch->PatchText(program_image, code)) {
|
||||
patch = &patches->emplace_back();
|
||||
patch->SetModuleID(nso_header.build_id); // In case the patcher is changed for big modules, the new patcher should also have the build_id
|
||||
}
|
||||
} else if (patch) {
|
||||
// Relocate code patch and copy to the program_image.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue