# wasm-linker: shared-memory fixes · gitcafe/zig

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

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

Visibility: public

Requested revision: 2672f7d9e8bcfc62b16a7073bddf330df4701762

Requested commit: 2672f7d9e8bcfc62b16a7073bddf330df4701762

Commit: 2672f7d9e8bcfc62b16a7073bddf330df4701762

Tree: 022b50ede28e4941fc6c861a2b9f3841043c3853

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: shared-memory fixes

Implements the `start` section which will execute a given function
at startup of the program. After function execution, the _start
function will be called by the runtime. In the case of shared-memory
we set this section to the function `__wasm_init_memory` which will
initialize all memory on startup.

This also fixes the above mentioned function to ensure we correctly
lower the i32 values.

Lastly, this fixes a typo where we would retrieve a global, instead
of setting its value.

```

## Parents

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

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