Skip to content

Commit c741bc4

Browse files
committed
Fix invalid addend condition, rename relocation methods
1 parent e314caf commit c741bc4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Linking.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,9 @@ Relocations are represented as WebAssembly annotations of the form
764764
| `global` | global* | `R_WASM_GLOBAL_INDEX_*` | Final WebAssembly global index |
765765
| `func` | function* | `R_WASM_FUNCTION_INDEX_*` | Final WebAssembly function index |
766766
| `functable` | function | `R_WASM_TABLE_INDEX_*` | Index into the dynamic function table, used for taking address of functions |
767-
| `text` | function | `R_WASM_FUNCTION_OFFSET` | Offset into the function body |
768-
| `funcsec` | function | `R_WASM_SECTION_OFFSET` | Offset into a function section |
769-
| `datasec` | data | `R_WASM_SECTION_OFFSET` | Offset into a data section |
767+
| `codeseg` | function | `R_WASM_FUNCTION_OFFSET` | Offset into the function body from the start of the function |
768+
| `codesec` | function | `R_WASM_SECTION_OFFSET` | Offset into the function section |
769+
| `datasec` | data | `R_WASM_SECTION_OFFSET` | Offset into the data section |
770770
| `customsec` | N/A | `R_WASM_SECTION_OFFSET` | Offset into a custom section |
771771
| `data` | data | `R_WASM_MEMORY_ADDR_*` | WebAssembly linear memory address |
772772

@@ -782,12 +782,12 @@ Symbol kinds marked with `*` are considered *primary*.
782782

783783
- `addend` describes the additional components of a relocation.
784784

785-
| `<addend>` | interpretation | condition |
786-
|--------------|----------------------|-------------------------------------------------------------------|
787-
| nothing | Zero addend | always |
788-
| `+<integer>` | Positive byte offset | `method` allows addend |
789-
| `-<integer>` | Negative byte offset | `method` allows addend and `format` is signed |
790-
| `<labeluse>` | Byte offest to label | `method` allows addend and `method` is either `text` or `section` |
785+
| `<addend>` | interpretation | condition |
786+
|--------------|----------------------|-----------------------------------------------|
787+
| nothing | Zero addend | always |
788+
| `+<integer>` | Positive byte offset | `method` allows addend |
789+
| `-<integer>` | Negative byte offset | `method` allows addend and `format` is signed |
790+
| `<labeluse>` | Byte offest to label | `method` is either `codeseg` or `*sec` |
791791

792792
- `symbol` describes the symbol against which to perform relocation.
793793
- For `funcsec` relocation method, this is the function id, so that if the addend is zero, the relocation points to the first instruction of that function.

0 commit comments

Comments
 (0)