mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
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:
parent
c260345e06
commit
e32288d4ea
2 changed files with 2 additions and 2 deletions
|
@ -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.
Loading…
Reference in a new issue