# Write page zero as first segment for Mach-O exes · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/9164daaa39a0ebffcfff27d6d8c91f5857bdfe04)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 9164daaa39a0ebffcfff27d6d8c91f5857bdfe04

Requested commit: 9164daaa39a0ebffcfff27d6d8c91f5857bdfe04

Commit: 9164daaa39a0ebffcfff27d6d8c91f5857bdfe04

Tree: 60193704528970ba9ed3eac3eca5c7525f523a42

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
Write page zero as first segment for Mach-O exes

According to the Mach-O file format reference, the first
load command should be a `__PAGEZERO` segment command. The
segment is located at virtual memory location 0, has no protection
rights, and causes acccesses to NULL to immediately crash.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>

```

## Parents

- [91de5c212fe847a309f047e3097491bba6f86ae1](https://git.cafe/gitcafe/zig/commit/91de5c212fe847a309f047e3097491bba6f86ae1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/9164daaa39a0ebffcfff27d6d8c91f5857bdfe04?format=markdown)
