Add (empty) __TEXT segment load command

Also, link against `libSystem` by default when targeting macOS.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
This commit is contained in:
Jakub Konka
2020-08-24 21:18:27 +02:00
parent 9745e7b512
commit 43b6d0e4b1
2 changed files with 107 additions and 63 deletions

View File

@@ -797,3 +797,16 @@ pub const CPU_SUBTYPE_X86_64_ALL: cpu_subtype_t = 0x3;
/// All ARM-based Macs
pub const CPU_SUBTYPE_ARM_ALL: cpu_subtype_t = 0x0;
// Protection values defined as bits within the vm_prot_t type
/// No VM protection
pub const VM_PROT_NONE: vm_prot_t = 0x0;
/// VM read permission
pub const VM_PROT_READ: vm_prot_t = 0x1;
/// VM write permission
pub const VM_PROT_WRITE: vm_prot_t = 0x2;
/// VM execute permission
pub const VM_PROT_EXECUTE: vm_prot_t = 0x4;