aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-08-26 15:29:32 -0400
committerSam Clegg <sbc@chromium.org>2021-09-14 06:47:37 -0700
commitef8c9135efcb3847fc0e5bbdb55eae18751090df (patch)
treee309496d229bfb1f249f830e9df05f33b1f895cf /llvm/lib/Object/WasmObjectFile.cpp
parent5041a485b948e55e54338779f2248c45402b0ae7 (diff)
downloadllvm-ef8c9135efcb3847fc0e5bbdb55eae18751090df.zip
llvm-ef8c9135efcb3847fc0e5bbdb55eae18751090df.tar.gz
llvm-ef8c9135efcb3847fc0e5bbdb55eae18751090df.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp7
1 files changed, 7 insertions, 0 deletions
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<GenericBinaryError>("unknown dylink.0 sub-section",
object_error::parse_failed);