# stage2: enable zig test on x86_64-macos \(\#10551\) · gitcafe/zig

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

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

Visibility: public

Requested revision: a4e6291fbdf83dec0d353af745c241bc7e01b3f2

Requested commit: a4e6291fbdf83dec0d353af745c241bc7e01b3f2

Commit: a4e6291fbdf83dec0d353af745c241bc7e01b3f2

Tree: d7815bde6915af53e27531c5f1b3737c7fd61a5a

Author: Jakub Konka

Committer: GitHub

## Message

```
stage2: enable zig test on x86_64-macos (#10551)

* stage2: put decls in different MachO sections

Use `getDeclVAddrWithReloc` when targeting MachO backend rather than
`getDeclVAddr` - this fn returns a zero vaddr and instead creates a
relocation on the linker side which will get automatically updated
whenever the target decl is moved in memory. This fn also records
a rebase of the target pointer so that its value is correctly slid
in presence of ASLR.

This commit enables `zig test` on x86_64-macos.

* stage2: fix output section selection for type,val pairs
```

## Parents

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

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