Browse Source

Add __dso_handle to exception list of deprecated export symbols

When compiling C to WASM with clang-8, __dso_handle is a global
that maybe exported but that currently is not whitelisted along
with __heap_base and _data_end to be handled as allowable depricated
exports. This PR adds the case for __dso_handle.
pull/1973/head
Johnnie Birch 4 years ago
parent
commit
60681d7019
  1. 5
      crates/wasmtime/src/linker.rs

5
crates/wasmtime/src/linker.rs

@ -445,6 +445,11 @@ impl Linker {
// which use --export-dynamic, which unfortunately doesn't work the way
// we want it to.
warn!("command module exporting '__heap_base' is deprecated");
} else if export.name() == "__dso_handle" && export.ty().global().is_some() {
// Allow an exported "__dso_handle" memory for compatibility with toolchains
// which use --export-dynamic, which unfortunately doesn't work the way
// we want it to.
warn!("command module exporting '__dso_handle' is deprecated")
} else if export.name() == "__rtti_base" && export.ty().global().is_some() {
// Allow an exported "__rtti_base" memory for compatibility with
// AssemblyScript.

Loading…
Cancel
Save