[PATCH] D44348: [WebAssembly] Generate imports for undefined data as well as functions

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 10 08:19:51 PST 2018


ncw added a comment.

Hmm, does this work? I mean I can see that it generates an imported global of course, but it doesn't //do// anything. The code that actually references the import is still going to have `0` written in as the value of the relocation!

The "fake globals" that are currently exported for defined data are at least usable in JavaScript, as a way of finding out the address to write to when you want to modify the variable. Is there a similar use (at this stage) for these imported globals?

Maybe hold off merging this until the discussion has come up with a full solution to the problem (assuming that this is the same as https://github.com/WebAssembly/tool-conventions/issues/48).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44348





More information about the llvm-commits mailing list