summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-09-11 02:38:01 -0700
committerGitHub <noreply@github.com>2021-09-11 09:38:01 +0000
commit5b90e0332253ee879d16fbc29d391ad75734ecf5 (patch)
treef05f7ef0be8418e4819ddd5eb50c81f617357a27 /src/wasm-binary.h
parentfc310a6dd6145d5d1470d8bf4cbb57c93f8785f1 (diff)
downloadbinaryen-5b90e0332253ee879d16fbc29d391ad75734ecf5.tar.gz
binaryen-5b90e0332253ee879d16fbc29d391ad75734ecf5.tar.bz2
binaryen-5b90e0332253ee879d16fbc29d391ad75734ecf5.zip
Support new dylink.0 custom section format (#4141)
See also: spec change: https://github.com/WebAssembly/tool-conventions/pull/170 llvm change: https://reviews.llvm.org/D109595 wabt change: https://github.com/WebAssembly/wabt/pull/1707 emscripten change: https://github.com/emscripten-core/emscripten/pull/15019
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 0c95f2b44..d8d712f62 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -403,6 +403,7 @@ namespace UserSections {
extern const char* Name;
extern const char* SourceMapUrl;
extern const char* Dylink;
+extern const char* Dylink0;
extern const char* Linking;
extern const char* Producers;
extern const char* TargetFeatures;
@@ -435,7 +436,10 @@ enum Subsection {
NameElem = 8,
NameData = 9,
// see: https://github.com/WebAssembly/gc/issues/193
- NameField = 10
+ NameField = 10,
+
+ DylinkMemInfo = 1,
+ DylinkNeeded = 2,
};
} // namespace UserSections
@@ -1230,6 +1234,7 @@ public:
void writeUserSection(const UserSection& section);
void writeFeaturesSection();
void writeDylinkSection();
+ void writeLegacyDylinkSection();
void initializeDebugInfo();
void writeSourceMapProlog();
@@ -1557,6 +1562,7 @@ public:
void readNames(size_t);
void readFeatures(size_t);
void readDylink(size_t);
+ void readDylink0(size_t);
// Debug information reading helpers
void setDebugLocations(std::istream* sourceMap_) { sourceMap = sourceMap_; }