diff options
| author | Sam Clegg <sbc@chromium.org> | 2018-02-23 05:08:53 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2018-02-23 05:08:53 +0000 |
| commit | 93102974386d5fe5ea217ec3d4aeda55395db4ff (patch) | |
| tree | 06f3eb15d4047c4949f48cc9f1cec2fdbda7e2e1 /lld/wasm/OutputSegment.h | |
| parent | 6c899ba6dee1a6cd1e1a49900bb5f3b6353a5487 (diff) | |
| download | bcm5719-llvm-93102974386d5fe5ea217ec3d4aeda55395db4ff.tar.gz bcm5719-llvm-93102974386d5fe5ea217ec3d4aeda55395db4ff.zip | |
[WebAssembly] Add explicit symbol table
This change modified lld to in response the llvm change which
moved to a more explicit symbol table in the object format.
Based on patches by Nicholas Wilson:
1. https://reviews.llvm.org/D41955
2. https://reviews.llvm.org/D42585
The primary difference that we see in the test output is that
for relocatable (-r) output we now have symbol table which
replaces exports/imports and globals.
See: https://github.com/WebAssembly/tool-conventions/issues/38
Differential Revision: https://reviews.llvm.org/D43264
llvm-svn: 325861
Diffstat (limited to 'lld/wasm/OutputSegment.h')
| -rw-r--r-- | lld/wasm/OutputSegment.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/wasm/OutputSegment.h b/lld/wasm/OutputSegment.h index 9825ce8e697..d3918a5ea1b 100644 --- a/lld/wasm/OutputSegment.h +++ b/lld/wasm/OutputSegment.h @@ -21,7 +21,7 @@ class InputSegment; class OutputSegment { public: - OutputSegment(StringRef N) : Name(N) {} + OutputSegment(StringRef N, uint32_t Index) : Name(N), Index(Index) {} void addInputSegment(InputSegment *Segment) { Alignment = std::max(Alignment, Segment->getAlignment()); @@ -36,6 +36,7 @@ public: void setSectionOffset(uint32_t Offset) { SectionOffset = Offset; } StringRef Name; + const uint32_t Index; uint32_t Alignment = 0; uint32_t StartVA = 0; std::vector<InputSegment *> InputSegments; |

