# macho: redo selection of segment/section for decls and consts · gitcafe/zig

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

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

Visibility: public

Requested revision: 1b8ed7842cc09ff687aa7386bf3af8565055a8d1

Requested commit: 1b8ed7842cc09ff687aa7386bf3af8565055a8d1

Commit: 1b8ed7842cc09ff687aa7386bf3af8565055a8d1

Tree: c439e150d94ca8d9d4263094cb9473a24df0580b

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: redo selection of segment/section for decls and consts

* fix alignment issues for consts with natural ABI alignment not
  matching that of the `ldr` instruction in `aarch64` - solved by
  preceeding the `ldr` with an additional `add` instruction to form
  the full address before dereferencing the pointer.
* redo selection of segment/section for decls and consts based on
  combined type and value

```

## Parents

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

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