# link.Elf.Object.initAtoms: reduce state access and indirection · gitcafe/zig

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

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

Visibility: public

Requested revision: c86a334d43c1818ed19eb403f88e61e38bbf20d6

Requested commit: c86a334d43c1818ed19eb403f88e61e38bbf20d6

Commit: c86a334d43c1818ed19eb403f88e61e38bbf20d6

Tree: 2fdfd31e19d6acb4ee3deb4ee873e10b161cdfb1

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
link.Elf.Object.initAtoms: reduce state access and indirection

The initAtoms function now only uses the `elf_file` parameter for
reporting linker error messages, making it easier to see that the
function has no data dependencies other than the Object struct itself,
making it easier to parallelize or otherwise move that logic around.

Also removed an indirect call via `addExtra` since we already know the
atom's file is the current Object instance. All calls to `Atom.addExtra`
should be audited for similar reasons.

Also removed unjustified use of `inline fn`.

```

## Parents

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

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