diff options
author | Sam Clegg <sbc@chromium.org> | 2017-07-12 00:24:54 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2017-07-12 00:24:54 +0000 |
commit | c9c28d96fabddd60e100c93ea64f173cc3d4cfdd (patch) | |
tree | c576dcdbd3abe1364e15eb3faab156ba7bb8c8ff /lib/ObjectYAML | |
parent | 4cdc8839345987817219acd53a5e6b902930821c (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ObjectYAML')
-rw-r--r-- | lib/ObjectYAML/WasmYAML.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ObjectYAML/WasmYAML.cpp b/lib/ObjectYAML/WasmYAML.cpp index 2040efdc9d1..6a68cd265ad 100644 --- a/lib/ObjectYAML/WasmYAML.cpp +++ b/lib/ObjectYAML/WasmYAML.cpp @@ -345,7 +345,8 @@ void MappingTraits<wasm::WasmInitExpr>::mapping(IO &IO, void MappingTraits<WasmYAML::DataSegment>::mapping( IO &IO, WasmYAML::DataSegment &Segment) { - IO.mapRequired("Index", Segment.Index); + IO.mapOptional("SectionOffset", Segment.SectionOffset); + IO.mapRequired("MemoryIndex", Segment.MemoryIndex); IO.mapRequired("Offset", Segment.Offset); IO.mapRequired("Content", Segment.Content); } |