[PATCH] D44028: [WebAssembly] Add message for relocation against weak undefined symbol

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 09:58:26 PST 2018


ncw created this revision.
ncw added reviewers: sbc100, ruiu.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.

Previously, LLD would have crashed.

These are the two error cases described for relocations in Linking.md. The operands for `call` and `get/set_global` simply can't be generated if the symbol is undefined (which is possible if it's weak).

Add test for this case.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44028

Files:
  test/wasm/undefined-weak-call.test
  test/wasm/undefined-weak-getglobal.test
  wasm/InputFiles.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44028.136783.patch
Type: text/x-patch
Size: 4834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180302/e65790a1/attachment.bin>


More information about the llvm-commits mailing list