From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:WebAssembly binary format" |
|---|
| claim | "Modules linked by wasm-ld (lld) without a later wasm-opt pass keep the 5-byte padded LEB128 encodings that relocations needed: call and global.get immediates look like 10 91 80 80 80 00 (call 17) and 23 80 80 80 80 00 (global.get 0). Binaryen-optimised output (Emscripten release builds) uses minimal encodings (23 00). Byte patterns over wasm code must allow for both." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:WebAssembly binary format" |
|---|
| observed_in | | "wabt wasm2c/benchmarks/dhrystone/dhrystone.wasm (clang 16.0.0)" |
| "wabt docs/demo/libwabt.wasm (Emscripten)" |
|
|---|
|
|---|
| data | | effect | "padded indices in final modules" |
|---|
| condition | "lld output not processed by wasm-opt" |
|---|
|
|---|
| evidence | | type | "byte_pattern" |
|---|
| detail | "dhrystone.wasm (sha256 bd2c1d020feb80203218b323124497fbac7317b73edd97e70d629a382f180b5b): 13 of 64 bodies contain 23 80 80 80 80 00; body at 0x1132 is 00 20 00 10 91 80 80 80 00 0B. libwabt.wasm (sha256 f48ba86bef5539a59db3089c88799a968ded68f78e61365249c99dcbd97767dc): 579 of 1358 bodies start with 23 00 41 .. 6B 22 .. 24 00 (minimal)." |
|---|
|
| type | "documentation" |
|---|
| detail | "tool-conventions Linking.md (commit 25aceba5adba8f3f7cdbadd8e8705784aebcad6a) line 189: relocated LEB128 values must be maximally padded" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "lld keeps padded LEB128 indices" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T14:35:59.921Z" |
|---|
| verifications | |
|---|