mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 23:42:43 +00:00
feature guard for jit_write_protect
This commit is contained in:
parent
e6ed95b080
commit
fa215a2fc3
@ -109,10 +109,17 @@ void Module::LoadModuleToMemory(u32& max_tls_index) {
|
||||
|
||||
const auto add_segment = [this](const elf_program_header& phdr, bool do_map = true) {
|
||||
const VAddr segment_addr = base_virtual_addr + phdr.p_vaddr;
|
||||
if (do_map) {
|
||||
if (do_map)
|
||||
{
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
pthread_jit_write_protect_np(false);
|
||||
#endif
|
||||
|
||||
elf.LoadSegment(segment_addr, phdr.p_offset, phdr.p_filesz);
|
||||
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
pthread_jit_write_protect_np(true);
|
||||
#endif
|
||||
}
|
||||
auto& segment = info.segments[info.num_segments++];
|
||||
segment.address = segment_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user