# macho: sort nlists within object before filtering by type · gitcafe/zig

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

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

Visibility: public

Requested revision: 4fd0cb7618ffb5428981672f6a21c411599f51b2

Requested commit: 4fd0cb7618ffb5428981672f6a21c411599f51b2

Commit: 4fd0cb7618ffb5428981672f6a21c411599f51b2

Tree: 5181986990d5273db055b879fc7c138ce794dbcc

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: sort nlists within object before filtering by type

Previously, we'd filter the nlists assuming they were correctly
ordered by type: local < extern defined < undefined within the
object's symbol table but this doesn't seem to be guaranteed,
therefore, we sort by type and address in one go, and filter
defined from undefined afterwards.

```

## Parents

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

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