Files
velzieandClaude Opus 5.5 33ad65dfcf Stateful providers for x86-64 Linux guests with a 64-bit guest memory (stream U, additive)
Called out for streams E and W, who share libprov: nothing changes for
wasm32 or i386 providers except types widened.
- libprov::Extras::memory_base is u64 (a data region may be above
  4 GiB); ftab's PIC globals take u64; the provider stack global is i64
  under M64. wasmprog and nt_cgen pass the address unchanged.
- register64: under mem64 the gex.provider_* imports take i64 pointers,
  sizes and table indices; gex.provider_thread_entry is new.
- install: a module that contains musl's __gex_thread_start gets a guest
  address of its own (low, read-only) bound to it, for clone.
- libprov::on_linux_maps: when a Linux shared object a provider serves
  maps executable, its .dynsym exports are bound to the provider before
  the loader can call them (Kernel::new_code, after each syscall).
- gexc: GEX_WASM_DLLS applies to Linux programs too (soname=module.wasm).

tools/unity-dotnet/sysroot builds the wasm64 sysroot: musl's gex wasm64
arch (wt/musl-wasm64, branch gex-wasm64, from stream W's gex-wasm32:
x86-64 syscalls through gex.syscall, guest registers restored, provider
init/attach, brk left to the guest) and compiler-rt.
tools/unity-dotnet/provider/gexprov64.h: the SysV/Win64 register view,
enter/return, the table.

tests/unity-dotnet/prov64: an x86-64 glibc program dlopens libgt.so and
calls it from three threads (integers, 8 arguments, doubles and floats,
TLS, malloc, write, getenv, the library's own pthreads); under gex
--mem64 the wasm64 provider gt.wasm runs instead and the output matches
the native run. tests/x86-programs 69/69, tests/providers 3/3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CaUXC2hGSgLjSxdmve9dnD
2026-10-04 17:33:02 -04:00
..