Files
betterxen/docs
zachdoxsee b8fbdf35b9 loader: map the PE headers at the image base (#333)
Windows maps the first SizeOfHeaders bytes of an image read-only at its
base, and programs read them: the mingw-w64 C runtime walks its own
section table before main. The loader mapped sections only, so that read
faulted.

Map the headers in whole 4 KiB pages before the sections, with the
optional header's ImageBase field set to the base the image is loaded
at. Refuse the load with PeError::InvalidHeaderSize when SizeOfHeaders
ends before the section table, runs past the file, or its pages reach
into a section. The header pages count toward the mapping budget.
ParsedPe::parse is unchanged.

The hand-built image in pe_mapping_limits.rs wrote SizeOfHeaders as
zero; it now writes a valid value.

Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
2026-11-24 18:15:56 +01:00
..

Xenora documentation

Getting started

Start with the project README for scope and build commands, then read the interface contracts. Reproduce an original guest test program or run the independent validation suite before changing either path. The changelog records notable changes.

Architecture and technical design

Native Metal graphics

RDNA 2 decoding and shader translation

Guest CPU and runtime experiments

Testing, validation, and benchmarks

Research and engineering decisions

Security, licensing, and contributions