# macho: assign and cache section ordinals upon creation · gitcafe/zig

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

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

Visibility: public

Requested revision: a4feb97cdfb330207f3da05402983bf3a71de64e

Requested commit: a4feb97cdfb330207f3da05402983bf3a71de64e

Commit: a4feb97cdfb330207f3da05402983bf3a71de64e

Tree: a2afbbb4567f128b4c1785c26d3a5bdb129dc9ce

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: assign and cache section ordinals upon creation

then, when sorting sections within segments, clear and redo the
ordinals since we re-apply them to symbols anyway. It is vital
to have the ordinals consistent with parsing and resolving relocs
however.

```

## Parents

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

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