Fix WSL regression with APE loader

Microsoft's version of Linux requires that the ELF program headers say
that the executable has 4096 byte alignment. However, it doesn't force
us to pad the binary with NOPs to a page-aligned size.
This commit is contained in:
Justine Tunney 2022-06-11 05:11:36 -07:00
parent c260345e06
commit e32288d4ea
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ phdrs: .long PT_LOAD # p_type
.quad ehdr # p_paddr
.quad filesz # p_filesz
.quad filesz # p_memsz
.quad 64 # p_align
.quad PAGESIZE # p_align
.long PT_LOAD # p_type
.long PF_R|PF_W # p_flags
@ -64,7 +64,7 @@ phdrs: .long PT_LOAD # p_type
.quad bss # p_paddr
.quad 0 # p_filesz
.quad bsssize # p_memsz
.quad 64 # p_align
.quad PAGESIZE # p_align
.long PT_GNU_STACK # p_type
.long PF_R|PF_W # p_flags

Binary file not shown.