[WebAssembly] Error on R_WASM_MEMORY_ADDR relocations against undefined data symbols.
authorSam Clegg <sbc@chromium.org>
Sat, 16 Mar 2019 01:18:12 +0000 (01:18 +0000)
committerSam Clegg <sbc@chromium.org>
Sat, 16 Mar 2019 01:18:12 +0000 (01:18 +0000)
commit632c217921c094b983bc54b5b18e3cd9b9a7fb1a
tree65dfb497cdd2b14a3a7ea043d620393c4399745e
parent7097e83dab7af66b02408df656afeae014e46711
[WebAssembly] Error on R_WASM_MEMORY_ADDR relocations against undefined data symbols.

For these types of relocations an absolute memory address is
required which is not possible for undefined data symbols.  For symbols
that can be undefined at link time (i.e. external data symbols in
shared libraries) a different type of relocation (i.e. via a GOT) will
be needed.

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

llvm-svn: 356310
lld/test/wasm/shared.ll
lld/test/wasm/undefined-data.ll [new file with mode: 0644]
lld/wasm/Writer.cpp