[WebAssembly] Error on relocations against undefined data symbols.
authorSam Clegg <sbc@chromium.org>
Mon, 22 Apr 2019 16:12:54 +0000 (16:12 +0000)
committerSam Clegg <sbc@chromium.org>
Mon, 22 Apr 2019 16:12:54 +0000 (16:12 +0000)
commit7cdec273ddac51fa002fb9eaaf36e274d311a856
tree8980908bfd197dd278f39998da2cb48f95c20101
parent55043e2336c07e790f4e879e217cb561e4f6b3f5
[WebAssembly] Error on relocations against undefined data symbols.

We can't (currently) meaningfully resolve certain types of relocations
against undefined data symbols.  Previously when `--allow-undefined` was
used we were treating such relocation much like weak data symbols and
simply inserting zeros.  This change turns such use cases in to an
error.

This means that `--allow-undefined` is no longer effective for data
symbols.

Fixes https://bugs.llvm.org/show_bug.cgi?id=40364

Differential Revision: https://reviews.llvm.org/D60882

llvm-svn: 358899
lld/test/wasm/undefined-data.ll
lld/wasm/InputFiles.cpp
lld/wasm/Writer.cpp