# elf: store pointer relocations indexed by containing atom · gitcafe/zig

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

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

Visibility: public

Requested revision: b9b1ab024063105a9adfe3828692867c91015dc6

Requested commit: b9b1ab024063105a9adfe3828692867c91015dc6

Commit: b9b1ab024063105a9adfe3828692867c91015dc6

Tree: ae0c2e67953f9fbb308ecb17d5bdd8438747cca9

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
elf: store pointer relocations indexed by containing atom

In `getDeclVAddr`, it may happen that the target `Decl` has not
been allocated space in virtual memory. In this case, we store a
relocation in the linker-global table which we will iterate over
when flushing the module, and fill in any missing address in the
final binary. Note that for optimisation, if the address was resolved
at the time of a call to `getDeclVAddr`, we skip relocating this
atom.

This commit also adds the glue code for lowering const slices in
the ARM backend.

```

## Parents

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

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