[WebAssembly] Expose the offset of each data segment
authorSam Clegg <sbc@chromium.org>
Wed, 12 Jul 2017 00:24:54 +0000 (00:24 +0000)
committerSam Clegg <sbc@chromium.org>
Wed, 12 Jul 2017 00:24:54 +0000 (00:24 +0000)
commit9c07f94a1f6d33a05f208b713c717cf9a221cb00
tree40481a6b372e9b00b47659633ca123796235bb75
parent878fdee0cf4e0357773b5198f6de1b48996dd090
[WebAssembly] Expose the offset of each data segment

Summary:
This allows tools like lld that process relocations
to apply data relocation correctly. This information
is required because relocation are stored as section
offset.

Subscribers: jfb, dschuff, jgravelle-google, aheejin

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

llvm-svn: 307741
llvm/include/llvm/BinaryFormat/Wasm.h
llvm/include/llvm/Object/Wasm.h
llvm/include/llvm/ObjectYAML/WasmYAML.h
llvm/lib/Object/WasmObjectFile.cpp
llvm/lib/ObjectYAML/WasmYAML.cpp
llvm/test/MC/WebAssembly/external-data.ll
llvm/test/MC/WebAssembly/unnamed-data.ll
llvm/test/ObjectYAML/wasm/data_section.yaml
llvm/tools/obj2yaml/wasm2yaml.cpp
llvm/tools/yaml2obj/yaml2wasm.cpp