From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:WebAssembly binary format" |
|---|
| claim | "C and C++ modules built with clang/wasm-ld or Emscripten usually place their first active data segment at linear-memory address 0x400 (1024): Emscripten's GLOBAL_BASE defaults to 1024, and the first data segment's offset expression is i32.const 0x400 (bytes 41 80 08 0B). A string referenced as i32.const 0x1234 is then at byte 0x1234 - 0x400 of that segment if the segment is long enough. Rust/wasm-bindgen output observed here starts data higher (0x200000), after the shadow stack." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:WebAssembly binary format" |
|---|
| observed_in | | "wabt dhrystone.wasm (clang 16.0.0)" |
| "wabt libwabt.wasm (Emscripten)" |
| "undici llhttp module in Node.js 24.13.0" |
| "wasm-bindgen module in Node.js 24.13.0 (0x200000)" |
|
|---|
|
|---|
| data | | effect | "first data segment offset expression i32.const 1024" |
|---|
| condition | "default layout; changed by --global-base / -sGLOBAL_BASE, or by stack-first layouts" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "var GLOBAL_BASE = 1024; 'Where global data begins; the start of static memory.'" |
|---|
| repo | "https://github.com/emscripten-core/emscripten" |
|---|
| commit | "5f63ff2e370da7e6fffd8f54379860bdd18118f9" |
|---|
| path | "src/settings.js" |
|---|
| lines | "286-290" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Data section, first segment: flags 0, offset expression 41 (i32.const) 0x400 in dhrystone.wasm, libwabt.wasm and the 54013-byte llhttp module carved from node.exe; 0x200000 in the 2.6 MB wasm-bindgen module carved from node.exe." |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "Static data starts at linear address 0x400" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T14:41:17.642Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:52:29.614Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read settings.js at 5f63ff2e (GLOBAL_BASE = 1024, lines 286-290) only; the observed-binary part was not re-checked." |
|---|
|
|
|---|