Squash commits for public release

This commit is contained in:
2025-02-12 09:54:05 -05:00
commit 7118adc514
1108 changed files with 80873 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
.section .text
.extern main
.extern exit
.extern _init
.extern _deinit
.global _start
_start:
push {r0-r2}
sub sp, sp, #4 // align to 16bytes
bl _init
add sp, sp, #4
pop {r0-r2}
bl main
push {r0}
sub sp, sp, #12 // align to 16bytes
bl _deinit
add sp, sp, #12
pop {r0}
bl exit

View File

@@ -0,0 +1,21 @@
.section .text
.extern main
.extern exit
.extern _init
.extern _deinit
.global _start
_start:
sub sp, sp, #0x40
stp x0,x1,[sp]
stp x2,x3,[sp,#0x10]
bl _init
ldp x0,x1,[sp]
ldp x2,x3,[sp,#0x10]
bl main
stp x0,x1,[sp]
bl _deinit
ldp x0,x1,[sp]
add sp, sp, #0x40
bl exit

View File

@@ -0,0 +1,8 @@
#include <sys/ioctl.h>
#include <sysdep.h>
int ioctl(int fd, uintptr_t cmd, uintptr_t arg)
{
int res = DO_SYSCALL_3(SYS_IOCTL, fd, cmd, arg);
RETURN_WITH_ERRNO(res, res, -1);
}

View File

@@ -0,0 +1,32 @@
.section .text
.extern main
.extern exit
.extern _init
.extern _deinit
.extern __global_pointer$
.global _start
_start:
.option push
.option norelax
la gp, __global_pointer$
.option pop
addi sp, sp, -0x40
sd a0, 0(sp)
sd a1, 8(sp)
sd a2, 16(sp)
sd a3, 24(sp)
call _init
ld a0, 0(sp)
ld a1, 8(sp)
ld a2, 16(sp)
ld a3, 24(sp)
call main
sd a0, 0(sp)
sd a1, 8(sp)
call _deinit
ld a0, 0(sp)
ld a1, 8(sp)
addi sp, sp, 0x40
call exit

View File

@@ -0,0 +1,15 @@
section .text
extern main
extern exit
extern _init
extern _deinit
global _start:function (_start.end - _start)
_start:
call _init
call main
push eax
call _deinit
call exit
.end:

View File

@@ -0,0 +1,27 @@
[bits 64]
section .text
extern main
extern exit
extern _init
extern _deinit
global _start:function (_start.end - _start)
_start:
push rsi
push rdi
push rdx
push rcx
call _init
pop rcx
pop rdx
pop rdi
pop rsi
call main
push rax
call _deinit
pop rax
mov rdi, rax
call exit
.end: