mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 20:40:28 +00:00
Mint APE Loader v1.3
This version has better error messages and safety checks. It supports loading static position-independent executables. It correctly handles more kinds of weird ELF program header layouts. A force flag has been added to avoid system execve(). Finally the longstanding misalignment with our ELF PT_NOTE section has been addressed.
This commit is contained in:
parent
82b1e61443
commit
3d172c99fe
19 changed files with 1001 additions and 470 deletions
|
@ -581,11 +581,8 @@ ape_stack_memsz2 = ape_stack_memsz * 2;
|
|||
ape_stack_align = 16;
|
||||
|
||||
ape_note_offset = ape_cod_offset + (ape_note - ape_cod_vaddr);
|
||||
ape_note_vaddr = ape_note;
|
||||
ape_note_paddr = ape_cod_paddr + ape_note_offset;
|
||||
ape_note_filesz = ape_note_end - ape_note;
|
||||
ape_note_memsz = ape_note_filesz;
|
||||
ape_note_align = __SIZEOF_POINTER__;
|
||||
|
||||
ape_text_offset = ape_cod_offset + LOADADDR(.text) - ape_cod_paddr;
|
||||
ape_text_paddr = LOADADDR(.text);
|
||||
|
@ -665,13 +662,10 @@ CHURN(ape_elf_shoff);
|
|||
CHURN(ape_elf_shstrndx);
|
||||
CHURN(ape_macho_end);
|
||||
CHURN(ape_note);
|
||||
CHURN(ape_note_align);
|
||||
CHURN(ape_note_end);
|
||||
CHURN(ape_note_filesz);
|
||||
CHURN(ape_note_memsz);
|
||||
CHURN(ape_note_offset);
|
||||
CHURN(ape_note_paddr);
|
||||
CHURN(ape_note_vaddr);
|
||||
CHURN(ape_ram_align);
|
||||
CHURN(ape_ram_filesz);
|
||||
CHURN(ape_ram_memsz);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue