[PATCH] D91577: [lld][WebAssembly] Add --unresolved-symbols=import-dynamic

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 16:43:37 PST 2020


sbc100 added a comment.

In D91577#2401182 <https://reviews.llvm.org/D91577#2401182>, @dschuff wrote:

> What's the use case for 'import-functions' mode after we roll this out?

It allows folks to have the semantics of `--allow-undefined` which has existing users.  We've seen a it bunch of times in bug reports, mostly among users of wasi-sdk.

The semantics of this option are still useful because it allows the binary to import all undefined function while zero-ing out undefined data symbols.  The new `import-dynamic` mode is not a suitable replacement for all users because (a) it requires use of the the experimental PIC ABI and (b) it requires all objects files that reference undefined data symbols to be built with `-fPIC`.

Indeed this is the default behaviour expected by emscripten, and will continue to be for a while now.

Are are you are asking.. "why bother allowing the `--unresolved-symbols=` version of this option when we can just use `--allow-undefined`"?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91577/new/

https://reviews.llvm.org/D91577



More information about the llvm-commits mailing list