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.