Skip to content

Add data segments to binary format #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BinaryEncoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ Yes:
* Type ID
* Count of locals
+ The serialized AST
* A `data` section contains
- A sequence of byte ranges within the binary and corresponding addresses in the linear memory


All strings are encoded as null-terminated UTF8.
Data segments represent initialized data that is loaded directly from the binary into the linear memory when the program starts (see [modules](Modules.md#initial-state-of-linear-memory)).

## Serialized AST

Expand Down
4 changes: 2 additions & 2 deletions Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ to allow *explicitly* sharing linear memory between multiple modules.

A module will contain a section declaring the linear memory size (initial and
maximum size allowed by [`resize_memory`](AstSemantics.md#resizing) and the
initial contents of memory (analogous to `.data`, `.rodata`, `.bss` sections in
native executables).
initial contents of memory,analogous to `.data`, `.rodata`, `.bss` sections in
native executables (see [binary encoding](BinaryEncoding.md#global-structure)

## Code section

Expand Down