mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Mint APE Loader v1.5
This change ports APE Loader to Linux AARCH64, so that Raspberry Pi users can run programs like redbean, without the executable needing to modify itself. Progress has also slipped into this change on the issue of making progress better conforming to user expectations and industry standards regarding which symbols we're allowed to declare
This commit is contained in:
parent
6843150e0c
commit
7e0a09feec
510 changed files with 1783 additions and 1483 deletions
41
ape/launch.S
41
ape/launch.S
|
@ -34,7 +34,44 @@
|
|||
// @param rdx is stack pointer (becomes zero)
|
||||
// @param rcx is passed through as-is
|
||||
// @noreturn
|
||||
Launch: xor %r8d,%r8d
|
||||
Launch:
|
||||
#ifdef __aarch64__
|
||||
|
||||
mov x16,x1
|
||||
mov sp,x2
|
||||
mov x1,0
|
||||
mov x2,0
|
||||
mov x3,0
|
||||
mov x4,0
|
||||
mov x5,0
|
||||
mov x6,0
|
||||
mov x7,0
|
||||
mov x8,0
|
||||
mov x9,0
|
||||
mov x10,0
|
||||
mov x11,0
|
||||
mov x12,0
|
||||
mov x13,0
|
||||
mov x14,0
|
||||
mov x15,0
|
||||
mov x17,0
|
||||
mov x19,0
|
||||
mov x20,0
|
||||
mov x21,0
|
||||
mov x22,0
|
||||
mov x23,0
|
||||
mov x24,0
|
||||
mov x25,0
|
||||
mov x26,0
|
||||
mov x27,0
|
||||
mov x28,0
|
||||
mov x29,0
|
||||
mov x30,0
|
||||
br x16
|
||||
|
||||
#else
|
||||
|
||||
xor %r8d,%r8d
|
||||
xor %r9d,%r9d
|
||||
xor %r10d,%r10d
|
||||
xor %r11d,%r11d
|
||||
|
@ -50,4 +87,6 @@ Launch: xor %r8d,%r8d
|
|||
xor %ebx,%ebx
|
||||
xor %eax,%eax
|
||||
ret
|
||||
|
||||
#endif
|
||||
.endfn Launch,globl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue