zig icon indicating copy to clipboard operation
zig copied to clipboard

Fix ELF alignment for freestanding targets

Open alex14fr opened this issue 1 year ago • 0 comments

The ELF specification (generic ABI) states that ``loadable process segments must have congruent values for p_vaddr and p_offset, modulo the page size''. Linux refuses to load binaries that don't meet this requirement (execve() fails with EINVAL). Ensures that output binaries always satisfy this condition by forcing page-alignment even for freestanding targets. (Related : #19750)

alex14fr avatar Apr 25 '24 08:04 alex14fr