# wasm-linker: Implement \`updateDeclExports\` · gitcafe/zig

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

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

Visibility: public

Requested revision: acec06cfaf9a82ec8037a23993ff36fa72eb6e82

Requested commit: acec06cfaf9a82ec8037a23993ff36fa72eb6e82

Commit: acec06cfaf9a82ec8037a23993ff36fa72eb6e82

Tree: 6fbabbcf1bedaf2b46ee42c170f187c2a34648f5

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: Implement `updateDeclExports`

We now correctly implement exporting decls. This means it is possible to export
a decl with a different name than the decl that is doing the export.
This also sets the symbols with the correct flags, so when we emit a relocatable
object file, a linker can correctly resolve symbols and/or export the symbol to the host environment.

This commit also includes fixes to ensure relocations have the correct offset to how other
linkers will expect the offset, rather than what we use internally.
Other linkers accept the offset, relative to the section.
Internally we use an offset relative to the atom.

```

## Parents

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

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