diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2020-08-18 17:45:04 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2020-08-18 23:35:31 +0200 |
| commit | e4b3da27203e0117ac29cceb03d7fe396f3931a7 (patch) | |
| tree | b6f030d5ee91564d7e3d5368315abc7f860a6c5d /lib | |
| parent | d139e44cfae68ace32458ff4d804dc6331b1ec8e (diff) | |
| download | zig-e4b3da27203e0117ac29cceb03d7fe396f3931a7.tar.gz zig-e4b3da27203e0117ac29cceb03d7fe396f3931a7.zip | |
Write out Mach-O header
This commit write out Mach-O header in the linker's `flush`
method. The header currently only populates the magic number,
filetype, and cpu info.
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/macho.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/std/macho.zig b/lib/std/macho.zig index a499a93675..950283b59f 100644 --- a/lib/std/macho.zig +++ b/lib/std/macho.zig @@ -703,3 +703,15 @@ pub const cpu_type_t = integer_t; pub const cpu_subtype_t = integer_t; pub const integer_t = c_int; pub const vm_prot_t = c_int; + +/// CPU type targeting 64-bit Intel-based Macs +pub const CPU_TYPE_X86_64: cpu_type_t = 0x01000007; + +/// CPU type targeting 64-bit ARM-based Macs +pub const CPU_TYPE_ARM64: cpu_type_t = 0x0100000C; + +/// All Intel-based Macs +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; |
