This is very similar to https://reviews.llvm.org/D103557 but applies to
symbols which are undefined at link time rather than compile time.
We already have code that handles symbols which were defined at link
time but dead stripped by --gc-sections (See
test/wasm/debug-removed-fn.ll). In that case the symbols are not live
(!isLive()). However, we can also have live symbols (which are
references by the program) but which are undefined at link time and are
imported by the linker.
In the test case here the symbol undef is used but is not defined
in the program but is imported by the linker due to the
--import-undefined flag.
Fixes: https://github.com/emscripten-core/emscripten/issues/15528