Files
Jonas Devlieghere 9a725a7e86 [lldb] Create a BSS section for WebAssembly object files (#206840)
Zero-initialized globals (BSS) live in a module's linear memory above
the initialized data segments, but wasm-ld emits no data segment for
them, so ObjectFileWasm created no section covering their addresses.
Reading those global without a running process fails with "unable to
resolve the module for file address", because the address resolved to no
section. Live reads did work because they go through process memory.

Synthesize a zero-fill section spanning from the end of the initialized
data to the linear memory's minimum size, and map it into linear memory
like the data segments. Live reads keep going through process memory
while zero-fill reads return zero.
2026-06-30 16:09:58 -07:00
..