diff options
| author | Douglas Crosher <info@jsstats.com> | 2016-02-27 14:03:19 +1100 |
|---|---|---|
| committer | Douglas Crosher <info@jsstats.com> | 2016-02-28 09:22:44 +1100 |
| commit | 531a3cde90728ae59e247c1a0dca7025d9caa01b (patch) | |
| tree | 9535b9d82c69a7715924105fdae94d18b285c6ea /BinaryEncoding.md | |
| parent | d198d6bfff4c267b573a6f00efda9f51a96d9d38 (diff) | |
| download | nanowasm-design-531a3cde90728ae59e247c1a0dca7025d9caa01b.tar.gz | |
Document the export table section.
As implemented in https://codereview.chromium.org/1744713003/
Diffstat (limited to 'BinaryEncoding.md')
| -rw-r--r-- | BinaryEncoding.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/BinaryEncoding.md b/BinaryEncoding.md index b0987fb..b6e3a6b 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -161,6 +161,26 @@ must contain a function body. Imported and exported functions must have a name. | body size | `uint16` | `flags[0] == 0` | size of function body to follow, in bytes | | body | `bytes` | `flags[0] == 0` | function body | +### Export Table section + +ID: `export_table` + +The export table section declares all exports from the module. +A module may contain at most one export table section. +This section must be preceded by a [Functions](#functions-section) section. + +| Field | Type | Description | +| ----- | ----- | ----- | +| count | `varuint32` | count of export entries to follow | +| entries | `export_entry*` | repeated export entries as described below | + +#### Export entry +| Field | Type | Description | +| ----- | ----- | ----- | +| sig_index | `uint16` | signature index of the export | +| func_index | `uint16` | index into the function table | +| func_name | `uint32` | offset from the start of the module of the string representing the export name | + ### Start Function section ID: `start_function` |
