[WebAssembly] Always take into account added when applying runtime relocations
authorSam Clegg <sbc@chromium.org>
Thu, 25 Apr 2019 17:11:54 +0000 (17:11 +0000)
committerSam Clegg <sbc@chromium.org>
Thu, 25 Apr 2019 17:11:54 +0000 (17:11 +0000)
commitb685ddf28882cf3b92575bc3ed7a42665324664e
treec34f55926fa6d8f6ec49c3f32d2f2c58107d1edf
parenta1309a31478435494ee20798869df2aae221991c
[WebAssembly] Always take into account added when applying runtime relocations

The code we generate for applying data relocations at runtime omitted
the symbols with GOT entries.

Also refactor the code to reduce duplication.

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

llvm-svn: 359207
lld/test/wasm/shared.ll
lld/wasm/InputChunks.cpp
lld/wasm/Symbols.cpp