# macho: implement object relinking in stage2 · gitcafe/zig

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

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

Visibility: public

Requested revision: 983d6dcd9ea75e05abd8ce2bd247bbad3960acd7

Requested commit: 983d6dcd9ea75e05abd8ce2bd247bbad3960acd7

Commit: 983d6dcd9ea75e05abd8ce2bd247bbad3960acd7

Tree: c5767d15a29bcc1e3704ca37e3dc0ddf54eca376

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: implement object relinking in stage2

* In watch mode, when changing the C source, we will trigger complete
  relinking of objects, dylibs and archives (atoms coming from the
  incremental updates stay put however). This means, we need to undo
  metadata populated when linking in objects, archives and dylibs.
* Remove unused splitting section into atoms bit. This optimisation
  will probably be best rewritten from scratch once self-hosted
  matures so parking the idea for now. Also, for easier management
  of atoms spawned from the Object file, keep the atoms subgraph as
  part of the Object file struct.
* Remove obsolete ref to static initializers in object struct.
* Implement handling of global symbol collision in updateDeclExports.

```

## Parents

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

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