# elf: sort PT_LOAD by address in PHDR table · gitcafe/zig

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

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

Visibility: public

Requested revision: b0e2c6323bfa8f5991546cb96122a29a599e0365

Requested commit: b0e2c6323bfa8f5991546cb96122a29a599e0365

Commit: b0e2c6323bfa8f5991546cb96122a29a599e0365

Tree: 4eec1a2217bb6ef914f30c21aac913bda1ee5471

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
elf: sort PT_LOAD by address in PHDR table

Turns out order matters as otherwise we face unexplainable
segfaults to do with improper page mapping in static environments
(dynamic environments seem unaffected).

```

## Parents

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

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