# wasm-linker: Fix & mangle symbol name of imports · gitcafe/zig

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

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

Visibility: public

Requested revision: b9224c172fea2399623bd707a10e021e776329bc

Requested commit: b9224c172fea2399623bd707a10e021e776329bc

Commit: b9224c172fea2399623bd707a10e021e776329bc

Tree: 0b219ff58e217077a274f98cf0453a4938464c90

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: Fix & mangle symbol name of imports

When outputting the names section, we should output the actual symbol
name rather than the import name. This makes sure that symbols with
an explicit name set have the correct name but retain the import name
too.

We also now correctly mangle the name of an extern function with an
explicit library name. This ensures that functions that have a
different library name, but the same import/function name, can be
resolved correctly with other modules and don't resolve to the
same symbol.

```

## Parents

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

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