From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Format:WebAssembly binary format" |
|---|
| claim | "Relocation type codes in the reloc.* custom sections of WebAssembly object files (clang -c, rustc), from the tool-conventions linking spec as implemented by wabt. LEB-type relocations patch 5-byte (or 10-byte for 64-bit) padded LEB128 fields in place." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:WebAssembly binary format" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "wasm_reloc_type" |
|---|
| underlying_type | "uint8_t" |
|---|
| values | | R_WASM_FUNCTION_INDEX_LEB | 0 |
|---|
| R_WASM_TABLE_INDEX_SLEB | 1 |
|---|
| R_WASM_TABLE_INDEX_I32 | 2 |
|---|
| R_WASM_MEMORY_ADDR_LEB | 3 |
|---|
| R_WASM_MEMORY_ADDR_SLEB | 4 |
|---|
| R_WASM_MEMORY_ADDR_I32 | 5 |
|---|
| R_WASM_TYPE_INDEX_LEB | 6 |
|---|
| R_WASM_GLOBAL_INDEX_LEB | 7 |
|---|
| R_WASM_FUNCTION_OFFSET_I32 | 8 |
|---|
| R_WASM_SECTION_OFFSET_I32 | 9 |
|---|
| R_WASM_TAG_INDEX_LEB | 10 |
|---|
| R_WASM_MEMORY_ADDR_REL_SLEB | 11 |
|---|
| R_WASM_TABLE_INDEX_REL_SLEB | 12 |
|---|
| R_WASM_GLOBAL_INDEX_I32 | 13 |
|---|
| R_WASM_MEMORY_ADDR_LEB64 | 14 |
|---|
| R_WASM_MEMORY_ADDR_SLEB64 | 15 |
|---|
| R_WASM_MEMORY_ADDR_I64 | 16 |
|---|
| R_WASM_MEMORY_ADDR_REL_SLEB64 | 17 |
|---|
| R_WASM_TABLE_INDEX_SLEB64 | 18 |
|---|
| R_WASM_TABLE_INDEX_I64 | 19 |
|---|
| R_WASM_TABLE_NUMBER_LEB | 20 |
|---|
| R_WASM_MEMORY_ADDR_TLS_SLEB | 21 |
|---|
| R_WASM_FUNCTION_OFFSET_I64 | 22 |
|---|
| R_WASM_MEMORY_ADDR_LOCREL_I32 | 23 |
|---|
| R_WASM_TABLE_INDEX_REL_SLEB64 | 24 |
|---|
| R_WASM_MEMORY_ADDR_TLS_SLEB64 | 25 |
|---|
| R_WASM_FUNCTION_INDEX_I32 | 26 |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "enum class RelocType FuncIndexLEB = 0 ... FuncIndexI32 = 26 (wabt names; the R_WASM_* spellings are LLVM's)" |
|---|
| repo | "https://github.com/WebAssembly/wabt" |
|---|
| commit | "1e9fffd80efa901b3e4708d4ba1f0df972e63518" |
|---|
| path | "include/wabt/common.h" |
|---|
| lines | "264-295" |
|---|
|
| type | "documentation" |
|---|
| detail | "tool-conventions Linking.md (commit 25aceba5adba8f3f7cdbadd8e8705784aebcad6a) line 189: all relocated LEB128 values must be maximally padded" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Relocation types" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T14:35:59.379Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T13:29:05.223Z" |
|---|
| summary | "common.h lines 264-291 read: RelocType 0-26, all 27 values and order match; complete." |
|---|
| changed | |
|---|
|
|
|---|