# macho: sanitize Zig sections segment names before emitting a relocatable · gitcafe/zig

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

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

Visibility: public

Requested revision: a1b607acb5c1e9dd03760efd7078185e7628b29d

Requested commit: a1b607acb5c1e9dd03760efd7078185e7628b29d

Commit: a1b607acb5c1e9dd03760efd7078185e7628b29d

Tree: 3397a620cb4c62c507bfac2eed0d50d082808395

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: sanitize Zig sections segment names before emitting a relocatable

As reported by jacobly, the Apple system linker matches sections to
segments by name and not by flags causing Zig's executable section
ending up in a segment with incorrect permission flags.

```

## Parents

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

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