Source/Packages

Compiler.ELF

packages/compiler/src/Compiler/ELF.alpha

282 lines59 declarations11.1 KiBSHA-256 88f2369f1a73

def · lines 166–166

elfPageBytes

Full file
The physical executor still receives the same 4 MiB PT_LOAD memory extent, but the file carries only its header and machine bytes, padded with zeros to the next 0x1000-byte page. Linux zero-fills p_memsz - p_filesz, avoiding a 4 MiB compile-time Bytes value. The page padding is not optional: the segment is not writable, and a kernel before 6.7 zeroes the rest of the last file-backed page itself (padzero) and fails the exec with EFAULT when it cannot write it -- measured 2026-09-24 on a RunPod host with Linux 6.5.0-44: every artifact died in execve with SIGSEGV; the same bytes padded to a page loaded. With p_filesz ending on a page boundary there is no partial page to zero.
166def elfPageBytes : Nat = 4096

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.