# macho: store source section address of relocs in context · gitcafe/zig

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

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

Visibility: public

Requested revision: e229202cb87a895401f2813f0f12227a0d715c09

Requested commit: e229202cb87a895401f2813f0f12227a0d715c09

Commit: e229202cb87a895401f2813f0f12227a0d715c09

Tree: aa8f679dbdd4e492b71978439ee75e67fe662aa2

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: store source section address of relocs in context

This is particularly relevant for x86_64 and C++ when relocating
StaticInit sections containing static initializers machine code.
Then, in case of SIGNED_X relocations, it is necessary to have the
full image of the VM address layout of the sections in the object
file as this is how the addend needs to be adjusted for non-extern
relocations.

```

## Parents

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

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