# Fix slight deviation from spec in handling Elf\*\_Rela relative relocations · gitcafe/zig

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

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

Visibility: public

Requested revision: ec337051a92b6f65bb29ddf41a290ea8e46b37b1

Requested commit: ec337051a92b6f65bb29ddf41a290ea8e46b37b1

Commit: ec337051a92b6f65bb29ddf41a290ea8e46b37b1

Tree: 155587f8b88f26fd146d3a5c87e9ea7be37c640e

Author: Shane Peelar

Committer: Andrew Kelley

## Message

```
Fix slight deviation from spec in handling Elf*_Rela relative relocations

`Elf*_Rela` relocations store their argument in `r_addend`, including for `R_*_RELATIVE` relocations.  Unlike `Elf*_Rel` relocations, they are not applied as a delta to the destination virtual address.  Instead, they are computed from `base_address + r_addend` directly.
```

## Parents

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

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