# wasm-linker: Fix symbol resolving and relocs · gitcafe/zig

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

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

Visibility: public

Requested revision: 4ebe8a53cab2c218657090f984b8ba10ef06b23a

Requested commit: 4ebe8a53cab2c218657090f984b8ba10ef06b23a

Commit: 4ebe8a53cab2c218657090f984b8ba10ef06b23a

Tree: 1ae5bf2d15c0b9eebf7ae9b10570dda094977c11

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: Fix symbol resolving and relocs

- Correctly get discard symbol by first checking if it was discarded or not.
- Remove imports if extern symbols were resolved by an object file.
- Correctly relocate data symbols by ensuring the atom is from the correct file.
- Fix the `Names` section by using the resolved symbols, rather than the ones defined in Zig code.

```

## Parents

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

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