From a60292dfb3c09fe08d84f2b737fd25f751afa64d Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sun, 13 Mar 2022 09:32:21 +0100 Subject: macos: add more mach primitives --- lib/std/macho.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/std/macho.zig') diff --git a/lib/std/macho.zig b/lib/std/macho.zig index d0cd238fa3..a6017ff8b4 100644 --- a/lib/std/macho.zig +++ b/lib/std/macho.zig @@ -1468,6 +1468,13 @@ pub const VM_PROT_WRITE: vm_prot_t = 0x2; /// VM execute permission pub const VM_PROT_EXECUTE: vm_prot_t = 0x4; +/// When a caller finds that they cannot obtain write permission on a +/// mapped entry, the following flag can be used. The entry will be +/// made "needs copy" effectively copying the object (using COW), +/// and write permission will be added to the maximum protections for +/// the associated entry. +pub const VM_PROT_COPY: vm_prot_t = 0x10; + // The following are used to encode rebasing information pub const REBASE_TYPE_POINTER: u8 = 1; pub const REBASE_TYPE_TEXT_ABSOLUTE32: u8 = 2; -- cgit v1.2.3