emscripten-core / emscripten-core/emscripten

import_name/import_module correctly name imports, but are still reported as undefined symbols when linking with STANDALONE_WASM

Open
#13,641 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

This is a spinoff of #10591, namely https://github.com/emscripten-core/emscripten/pull/10591#issuecomment-795746846.

Using `import_name`/`import_module` attributes in Clang, imported functions are properly named in the resulting WASM/WAT files; however, when linking _specifically_ with `emcc` (as opposed to `wasm-ld`), such symbols are still reported as unresolved.

Note that, in my case at least, I am compiling a standalone WASM module that isn't necessarily intended for Javascript. Everything works fine, namely when disabling unresolved symbol errors, it's just a slightly larger bug surface area if a symbol is _actually_ unresolved (as a result of a bug).

cc @sbc100

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.