w6l: purge dead elf branches; pin rx extent
This commit is contained in:
@@ -376,7 +376,6 @@ l_emit_dyn_elf(Lnk *l, FILE *f, u64 base, u64 entry)
|
||||
const u64 gotplt_va = base + gotplt_off;
|
||||
const u64 dynamic_va = base + dynamic_off;
|
||||
const u64 data_va = base + data_off;
|
||||
(void)dynstr_va; (void)hash_va; (void)plt_va;
|
||||
|
||||
/* Now that the dyn layout pins text_va/data_va, apply
|
||||
* relocations. main.c defers this; the static path runs it from
|
||||
@@ -587,6 +586,8 @@ l_emit_dyn_elf(Lnk *l, FILE *f, u64 base, u64 entry)
|
||||
ph[0].p_vaddr = base;
|
||||
ph[0].p_paddr = base;
|
||||
ph[0].p_filesz = rx_end;
|
||||
/* The loader page-rounds mappings; gotplt_off independently starts
|
||||
* the next page, so padding is not part of the R+X extent. */
|
||||
ph[0].p_memsz = rx_end;
|
||||
ph[0].p_align = page;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user