From 93102974386d5fe5ea217ec3d4aeda55395db4ff Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 23 Feb 2018 05:08:53 +0000 Subject: [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 --- lld/wasm/OutputSegment.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lld/wasm/OutputSegment.h') 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 InputSegments; -- cgit v1.2.3