[PATCH] D47162: [WebAssembly] Initial support for LTO

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 13:27:53 PDT 2018


pcc added inline comments.


================
Comment at: wasm/Driver.cpp:281
+static Symbol *handleUndefined(StringRef Name) {
+  Symbol *S = Symtab->addUndefinedFunction(Name, 0, nullptr, nullptr);
+
----------------
sbc100 wrote:
> pcc wrote:
> > pcc wrote:
> > > Should we implement `-u` in the same way as in the ELF linker? With this implementation it doesn't look like it will work correctly for undefined data and globals.
> > Please address.
> You are correct.   Right now with wasm-ld `-u` flag only works for function symbols.  This is a current limitation of the wasm linker, not something that this change introduces.  I agree we should address that, but that would be a separate change I think.
Yes it should be a separate change, just something I noticed while reviewing this code.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47162





More information about the llvm-commits mailing list