diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-11-05 13:17:50 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-11-05 13:17:50 +0100 |
| commit | 9c120168593c9565780c365aef0f511f3e692d61 (patch) | |
| tree | 9c9a94ca40d11fdeb32d574b26ac51264bcfd8db /src/elfs | |
| parent | e6943c8a9dad781aa5e1caf7c0cd59041e3c29f8 (diff) | |
| download | box64-9c120168593c9565780c365aef0f511f3e692d61.tar.gz box64-9c120168593c9565780c365aef0f511f3e692d61.zip | |
Better way to track mapped memory
Diffstat (limited to 'src/elfs')
| -rw-r--r-- | src/elfs/elfloader.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c index 7cc4ec12..0e9feb75 100644 --- a/src/elfs/elfloader.c +++ b/src/elfs/elfloader.c @@ -216,7 +216,7 @@ int AllocLoadElfMemory(box64context_t* context, elfheader_t* head, int mainbin) printf_log(log_level, "Delta of %p (vaddr=%p) for Elf \"%s\"\n", (void*)offs, (void*)head->vaddr, head->name); head->image = image; - setProtection_mmap((uintptr_t)image, head->memsz, 0); + setProtection((uintptr_t)image, head->memsz, 0); head->multiblocks = (multiblock_t*)box_calloc(head->multiblock_n, sizeof(multiblock_t)); head->tlsbase = AddTLSPartition(context, head->tlssize); @@ -260,7 +260,7 @@ int AllocLoadElfMemory(box64context_t* context, elfheader_t* head, int mainbin) try_mmap = 0; printf_log(log_level, "Mapping failed, using regular mmap+read"); } else { - setProtection_mmap((uintptr_t)p, head->multiblocks[n].asize, prot); + setProtection((uintptr_t)p, head->multiblocks[n].asize, prot); head->multiblocks[n].p = p; } @@ -285,7 +285,7 @@ int AllocLoadElfMemory(box64context_t* context, elfheader_t* head, int mainbin) } return 1; } - setProtection_mmap((uintptr_t)p, head->multiblocks[n].asize, prot); + setProtection((uintptr_t)p, head->multiblocks[n].asize, prot); head->multiblocks[n].p = p; if(e->p_filesz) { fseeko64(head->file, head->multiblocks[n].offs, SEEK_SET); |