[WebAssembly] MC: Include unnamed data when writing wasm files
authorSam Clegg <sbc@chromium.org>
Thu, 25 May 2017 21:08:07 +0000 (21:08 +0000)
committerSam Clegg <sbc@chromium.org>
Thu, 25 May 2017 21:08:07 +0000 (21:08 +0000)
commit1c154a6107804f4da2bf6baf7b2eeb0ee996dcd3
tree127b462eb1aa36db67a425034d7d51438295d6a1
parentdda25b128cc05da413027f2fbc369c833d4f8b1e
[WebAssembly] MC: Include unnamed data when writing wasm files

Also, include global entries for all data symbols, not
just external ones, since these are referenced by the
relocation records.

Add a test case that includes unnamed data.

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

llvm-svn: 303915
llvm/lib/MC/WasmObjectWriter.cpp
llvm/test/MC/WebAssembly/unnamed-data.ll [new file with mode: 0644]