|
|
|
@ -46,8 +46,7 @@ Patcher::Patcher() : c(m_patch_instructions), c_pre(m_patch_instructions_pre) { |
|
|
|
|
|
|
|
Patcher::~Patcher() = default; |
|
|
|
|
|
|
|
bool Patcher::PatchText(const Kernel::PhysicalMemory& program_image, |
|
|
|
const Kernel::CodeSet::Segment& code) { |
|
|
|
bool Patcher::PatchText(std::vector<const u8> program_image, const Kernel::CodeSet::Segment& code) { |
|
|
|
// If we have patched modules but cannot reach the new module, then it needs its own patcher.
|
|
|
|
const size_t image_size = program_image.size(); |
|
|
|
|
|
|
|
@ -175,10 +174,7 @@ bool Patcher::PatchText(const Kernel::PhysicalMemory& program_image, |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
bool Patcher::RelocateAndCopy(Common::ProcessAddress load_base, |
|
|
|
const Kernel::CodeSet::Segment& code, |
|
|
|
Kernel::PhysicalMemory& program_image, |
|
|
|
EntryTrampolines* out_trampolines) { |
|
|
|
bool Patcher::RelocateAndCopy(Common::ProcessAddress load_base, const Kernel::CodeSet::Segment& code, std::vector<u8>& program_image, EntryTrampolines* out_trampolines) { |
|
|
|
const size_t patch_size = GetSectionSize(); |
|
|
|
const size_t pre_patch_size = GetPreSectionSize(); |
|
|
|
|
|
|
|
|