Skip to content

Commit

Permalink
Address review comments:
Browse files Browse the repository at this point in the history
Add explanations for the relocations that didn't have them, and fix copypasta.
  • Loading branch information
sunfishcode committed Mar 9, 2017
1 parent 1c7234d commit cd509ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ A relocation type can be one of the following:
5-byte [varint32]. Used to refer to the immediate argument of a `i32.const`
instruction, e.g. taking the address of a function.
- `2 / R_WEBASSEMBLY_TABLE_INDEX_I32` - a function table index encoded as a
[uint32].
[uint32], e.g. taking the address of a function in a static data initializer.
- `3 / R_WEBASSEMBLY_GLOBAL_ADDR_LEB` - a global index encoded as a 5-byte
[varuint32]. Used for the immediate argument of a `load` or `store`
instruction.
instruction, e.g. directly loading from or storing to a C++ global.
- `4 / R_WEBASSEMBLY_GLOBAL_ADDR_SLEB` - a global index encoded as a 5-byte
[varint32]. Used for the immediate argument of a `i32.const` instruction,
e.g. taking the address of a function.
- `5 / R_WEBASSEMBLY_GLOBAL_ADDR_I32` - a global index encoded as a [uint32].
e.g. taking the address of a C++ global.
- `5 / R_WEBASSEMBLY_GLOBAL_ADDR_I32` - a global index encoded as a [uint32],
e.g. taking the address of a C++ global in a static data initializer.

[varuint32]: https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#varuintn
[varint32]: https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#varintn
Expand Down

0 comments on commit cd509ba

Please sign in to comment.