# NetBSD: avoid ldd error on executables\. zig cc produce 4 PT_LOAD segments, · gitcafe/zig

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

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

Visibility: public

Requested revision: 595a7f8b0839d272a4cef738354fb13fe96e1db9

Requested commit: 595a7f8b0839d272a4cef738354fb13fe96e1db9

Commit: 595a7f8b0839d272a4cef738354fb13fe96e1db9

Tree: 75bae5aabdec2c33fd1285fc26aca448a93b6a1f

Author: Alain Greppin

Committer: Andrew Kelley

## Message

```
NetBSD: avoid ldd error on executables. zig cc produce 4 PT_LOAD segments,
wheras on NetBSD, only 2 PT_LOAD are usually produced by other compilers
(tested with host gcc and clang).

    $ ldd -v main_4segs
    .../main_4segs: wrong number of segments (4 != 2)
    .../main_4segs: invalid ELF class 2; expected 1

```

## Parents

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

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