# wasm-linker: discard symbol when both undefined · gitcafe/zig

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

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

Visibility: public

Requested revision: 2339b25fd42ccd136660b9e4575aab2bb85b1163

Requested commit: 2339b25fd42ccd136660b9e4575aab2bb85b1163

Commit: 2339b25fd42ccd136660b9e4575aab2bb85b1163

Tree: 490b3011197f7dc8fe5f4c3f320cb9c0f5e72737

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: discard symbol when both undefined

During symbol resolution when both symbols are undefined, we must
discard the new symbol with a reference to the existing symbol. This
ensures the original symbol remains undefined. This fixes symbol
resolution when linking with WASI-libC.

```

## Parents

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

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