w6l: purge dead elf branches; pin rx extent

This commit is contained in:
2026-08-09 04:37:33 +09:00
parent e720d4802f
commit ac8ddee6c1
8 changed files with 33 additions and 29 deletions

View File

@@ -668,6 +668,8 @@ export fn emitdynelf(l: *lnk, fd: i32, base: u64, entry: u64) i32 = {
dwr64(filebuf.ptr, p0 + 16u64, base);
dwr64(filebuf.ptr, p0 + 24u64, base);
dwr64(filebuf.ptr, p0 + 32u64, rxend);
// The loader page-rounds mappings; gotpltoff independently starts
// the next page, so padding is not part of the R+X extent.
dwr64(filebuf.ptr, p0 + 40u64, rxend);
dwr64(filebuf.ptr, p0 + 48u64, PAGE);