[WebAssembly] Add size of section header to data relocation offsets.
authorSam Clegg <sbc@chromium.org>
Fri, 28 Apr 2017 21:22:38 +0000 (21:22 +0000)
committerSam Clegg <sbc@chromium.org>
Fri, 28 Apr 2017 21:22:38 +0000 (21:22 +0000)
commita06de02889de4690542e2ddfe4c9bb89dcf02ddd
tree889ba7f6f6a97471964331692a80876b1f9242c2
parent3d76f2ccd30f919bd354001b2d089be91dfd18b3
[WebAssembly] Add size of section header to data relocation offsets.

Also, add test for data relocations and fix addend to
be signed.

Subscribers: jfb, dschuff

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

llvm-svn: 301690
llvm/include/llvm/MC/MCSectionWasm.h
llvm/include/llvm/MC/MCWasmObjectWriter.h
llvm/include/llvm/Support/Wasm.h
llvm/lib/MC/WasmObjectWriter.cpp
llvm/test/MC/WebAssembly/reloc-data.ll [new file with mode: 0644]