fix frida build for linux arm64 (#1487)

This commit is contained in:
David CARLIER 2023-08-31 01:01:32 +01:00 committed by GitHub
parent 81bdbc0dde
commit 09295ae819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1672,13 +1672,12 @@ impl AsanRuntime {
); );
let blob = ops.finalize().unwrap(); let blob = ops.finalize().unwrap();
let mut map_flags = MapFlags::MAP_ANON | MapFlags::MAP_PRIVATE;
// apple aarch64 requires MAP_JIT to allocates WX pages // apple aarch64 requires MAP_JIT to allocates WX pages
#[cfg(all(target_vendor = "apple", target_arch = "aarch64"))] #[cfg(target_vendor = "apple")]
{ let map_flags = MapFlags::MAP_ANON | MapFlags::MAP_PRIVATE | MapFlags::MAP_JIT;
map_flags |= MapFlags::MAP_JIT; #[cfg(not(target_vendor = "apple"))]
} let map_flags = MapFlags::MAP_ANON | MapFlags::MAP_PRIVATE;
unsafe { unsafe {
let mapping = mmap( let mapping = mmap(