]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Improve support for "needed" list in dylink section
authorSam Clegg <sbc@chromium.org>
Wed, 13 Mar 2019 21:29:20 +0000 (21:29 +0000)
committerSam Clegg <sbc@chromium.org>
Wed, 13 Mar 2019 21:29:20 +0000 (21:29 +0000)
This change adds basic support for shared library dependencies
via the dylink section.

See https://github.com/WebAssembly/tool-conventions/pull/77

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356102 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/WasmObjectFile.cpp

index 9d084bf4753624fb65d5bb25c60a10879bb9f292..2ff2c555d5e90171c1ec4760f89eb5e7becaeb2a 100644 (file)
@@ -324,6 +324,7 @@ Error WasmObjectFile::parseSection(WasmSection &Sec) {
 
 Error WasmObjectFile::parseDylinkSection(ReadContext &Ctx) {
   // See https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
+  HasDylinkSection = true;
   DylinkInfo.MemorySize = readVaruint32(Ctx);
   DylinkInfo.MemoryAlignment = readVaruint32(Ctx);
   DylinkInfo.TableSize = readVaruint32(Ctx);