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:
Justine Tunney 2023-07-26 13:54:49 -07:00
parent 6843150e0c
commit 7e0a09feec
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
510 changed files with 1783 additions and 1483 deletions

View file

@ -416,39 +416,31 @@ syscon utime UTIME_NOW 0x3fffffff 0x3fffffff -1 -1 -1 -2 0x3fffffff
syscon utime UTIME_OMIT 0x3ffffffe 0x3ffffffe -2 -2 -2 -1 0x3ffffffe -1 # timespec::tv_nsec may be this; polyfilled xnu/nt
# getauxval() keys
#
# Unsupported values are encoded as 0.
# libc/sysv/consts/auxv.h
#
# group name GNU/Systemd GNU/Systemd (Aarch64) XNU's Not UNIX! MacOS (Arm64) FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon auxv AT_EXECFD 2 2 0 0 2 0 2 0 # file descriptor of program
syscon auxv AT_PHDR 3 3 3 3 3 0 3 0 # address of program headers of executable
syscon auxv AT_PHENT 4 4 4 4 4 0 4 0
syscon auxv AT_PHNUM 5 5 5 5 5 0 5 0
syscon auxv AT_PAGESZ 6 6 6 6 6 0 6 0
syscon auxv AT_BASE 7 7 7 7 7 0 7 0 # address of program interpreter
syscon auxv AT_FLAGS 8 8 0 0 8 0 8 0
syscon auxv AT_ENTRY 9 9 9 9 9 0 9 0 # entry address of executable
syscon auxv AT_NOTELF 10 10 0 0 10 0 0 0
syscon auxv AT_EXECFN 31 31 31 31 15 31 2014 31 # address of string containing first argument passed to execve() used when running program; AT_EXECPATH on FreeBSD
syscon auxv AT_SECURE 23 23 23 23 0 23 0 23
syscon auxv AT_RANDOM 25 25 25 25 16 25 0 25 # address of sixteen bytes of random data; AT_CANARY on FreeBSD whose AT_CANARYLEN should be 64
syscon auxv AT_HWCAP 16 16 16 16 0 16 0 16
syscon auxv AT_HWCAP2 26 26 26 26 0 26 0 26
syscon auxv AT_UID 11 11 11 11 0 11 2001 11
syscon auxv AT_EUID 12 12 12 12 0 12 2000 12
syscon auxv AT_GID 13 13 13 13 0 13 2003 13
syscon auxv AT_EGID 14 14 14 14 0 14 2002 14
syscon auxv AT_EXECFD 2 2 0 0 2 2 2 2 # file descriptor of program
syscon auxv AT_NOTELF 10 10 0 0 10 10 0 10
syscon auxv AT_OSRELDATE 0 0 0 0 18 0 0 0
syscon auxv AT_UID 11 11 11 11 0 0 2001 0
syscon auxv AT_EUID 12 12 12 12 0 0 2000 0
syscon auxv AT_GID 13 13 13 13 0 0 2003 0
syscon auxv AT_EGID 14 14 14 14 0 0 2002 0
syscon auxv AT_PLATFORM 15 15 0 0 0 0 0 0 # address of string with hardware platform for rpath interpretation
syscon auxv AT_HWCAP 16 16 16 16 0 0 0 0
syscon auxv AT_CLKTCK 17 17 0 0 0 0 0 0
syscon auxv AT_DCACHEBSIZE 19 19 0 0 0 0 0 0
syscon auxv AT_ICACHEBSIZE 20 20 0 0 0 0 0 0
syscon auxv AT_UCACHEBSIZE 21 21 0 0 0 0 0 0
syscon auxv AT_SECURE 23 23 23 23 0 0 0 0
syscon auxv AT_BASE_PLATFORM 24 24 0 0 0 0 0 0
syscon auxv AT_RANDOM 25 25 25 25 16 0 0 0 # address of sixteen bytes of random data; AT_CANARY on FreeBSD whose AT_CANARYLEN should be 64
syscon auxv AT_HWCAP2 26 26 26 26 0 0 0 0
syscon auxv AT_EXECFN 31 31 31 31 15 999 2014 31 # address of string containing first argument passed to execve() used when running program; AT_EXECPATH on FreeBSD
syscon auxv AT_SYSINFO_EHDR 33 33 0 0 0 0 0 0
syscon auxv AT_PLATFORM 15 15 0 0 0 15 0 15 # address of string with hardware platform for rpath interpretation
syscon auxv AT_CLKTCK 17 17 0 0 0 17 0 17
syscon auxv AT_DCACHEBSIZE 19 19 0 0 0 19 0 19
syscon auxv AT_ICACHEBSIZE 20 20 0 0 0 20 0 20
syscon auxv AT_UCACHEBSIZE 21 21 0 0 0 21 0 21
syscon auxv AT_BASE_PLATFORM 24 24 0 0 0 24 0 24
syscon auxv AT_SYSINFO_EHDR 33 33 0 0 0 33 0 33
syscon auxv AT_STACKBASE 0 0 0 0 0 0 13 0
syscon auxv AT_EXECPATH 31 31 31 31 15 999 2014 31 # FreeBSD name for AT_EXECFN
syscon auxv AT_MINSIGSTKSZ 51 51 0 0 0 0 0 0 # FreeBSD name for AT_EXECFN
syscon auxv AT_EXECPATH 31 31 31 31 15 31 2014 31 # FreeBSD name for AT_EXECFN
syscon auxv AT_MINSIGSTKSZ 51 51 0 0 0 51 0 51 # FreeBSD name for AT_EXECFN
syscon auxv AT_CANARY 0 0 0 0 16 0 0 0
syscon auxv AT_CANARYLEN 0 0 0 0 17 0 0 0
syscon auxv AT_NCPUS 0 0 0 0 19 0 0 0
@ -457,7 +449,7 @@ syscon auxv AT_PAGESIZESLEN 0 0 0 0 21 0 0 0
syscon auxv AT_TIMEKEEP 0 0 0 0 22 0 0 0
syscon auxv AT_STACKPROT 0 0 0 0 23 0 0 0
syscon auxv AT_EHDRFLAGS 0 0 0 0 24 0 0 0
syscon auxv AT_NO_AUTOMOUNT 0x0800 0x0800 0 0 0 0 0 0
syscon auxv AT_NO_AUTOMOUNT 0x0800 0x0800 0 0 0 0x0800 0 0x0800
# getrlimit() / setrlimit() resource parameter
#