From ef8c9135efcb3847fc0e5bbdb55eae18751090df Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 26 Aug 2021 15:29:32 -0400 Subject: [WebAssembly] Allow import and export of TLS symbols between DSOs We previously had a limitation that TLS variables could not be exported (and therefore could also not be imported). This change removed that limitation. Differential Revision: https://reviews.llvm.org/D108877 --- llvm/lib/Object/WasmObjectFile.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Object/WasmObjectFile.cpp') diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index 3b1392e..300d08f 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -384,6 +384,13 @@ Error WasmObjectFile::parseDylink0Section(ReadContext &Ctx) { DylinkInfo.Needed.push_back(readString(Ctx)); } break; + case wasm::WASM_DYLINK_EXPORT_INFO: { + uint32_t Count = readVaruint32(Ctx); + while (Count--) { + DylinkInfo.ExportInfo.push_back({readString(Ctx), readVaruint32(Ctx)}); + } + break; + } default: return make_error("unknown dylink.0 sub-section", object_error::parse_failed); -- cgit v1.1