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

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

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

Visibility: public

Requested revision: 956f53beb09c07925970453d4c178c6feb53ba70

Requested commit: 956f53beb09c07925970453d4c178c6feb53ba70

Commit: 956f53beb09c07925970453d4c178c6feb53ba70

Tree: d3f48c4dbce3deb29dc106dfcfb149b52062b95a

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

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

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