cosmopolitan/test/libc/calls
Justine Tunney db0d8dd806 Support Linux binfmt_misc and APE loading on Apple
The "no modify self" variant of Actually Portable Executable is now
supported on all platforms. If you use `$(APE_NO_MODIFY_SELF)` then
ld.bfd will embed a 4096 byte ELF binary and a 4096 byte Macho file
which are installed on the fly to ${TMPDIR:-/tmp}, which enables us
launch the executable, without needing to copy the whole executable

To prevent it from copying a tiny executable to your temp directory
you need to install the `ape` command (renamed from ape-loader), to
a system path. For example:

    # FreeBSD / NetBSD / OpenBSD
    make -j8 o//ape/ape
    cp o//ape/ape /usr/bin/ape

    # Mac OS
    # make -j8 o//ape/ape.macho
    curl https://justine.lol/ape.macho >/usr/bin/ape
    chmod +x /usr/bin/ape

On Linux you can get even more performance with the new binfmt_misc
support which makes launching non-modifying APE binaries as fast as
launching ELF executables. Running the following command:

    # Linux
    ape/apeinstall.sh

Will copy APE loader to /usr/bin/ape and register with binfmt_misc
Lastly, this change also fixes a really interesting race condition
with OpenBSD thread joining.
2022-05-21 09:28:25 -07:00
..
access_test.c Make improvements 2022-04-26 16:46:15 -07:00
chdir_test.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
clock_gettime_test.c Make improvements 2022-04-26 16:46:15 -07:00
commandv_test.c Make some systemic improvements 2022-05-18 16:52:36 -07:00
dup_test.c Make improvements 2022-04-26 16:46:15 -07:00
execve_test.c Support Linux binfmt_misc and APE loading on Apple 2022-05-21 09:28:25 -07:00
fcntl_test.c Improve synchronization 2022-04-15 15:31:55 -07:00
fileexists_test.c Improve system call support 2021-08-25 21:36:17 -07:00
ftruncate_test.c Add syscalls to Blinkenlights and fix bugs 2022-05-13 13:31:21 -07:00
getcwd_test.c Add raw parameter to redbean lua compress 2022-05-17 10:41:23 -07:00
getitimer_test.c Improve ZIP filesystem and change its prefix 2021-08-22 01:11:53 -07:00
ioctl_siocgifconf_test.c Add test for ioctl(SIOCGIFCONF) and polyfill on BSDs 2021-06-25 18:44:04 -07:00
lseek_test.c Eliminate some flakes 2021-02-03 06:25:27 -08:00
mkdir_test.c Make some systemic improvements 2022-05-18 16:52:36 -07:00
mkntcmdline_test.c Make improvements 2022-04-28 09:57:07 -07:00
mkntenvblock_test.c Make improvements 2022-04-28 09:57:07 -07:00
mkntpath_test.c Remove garbage collector macro from header (#114) 2021-03-07 20:23:29 -08:00
open_test.c Fix many thread and file descriptor issues on Windows 2022-05-20 20:57:19 -07:00
pipe_test.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
pread_test.c Fix more things 2022-03-24 00:12:29 -07:00
printargs_test.c Fix bugs with recent change 2022-04-16 10:40:23 -07:00
read_test.c Make improvements 2022-04-24 10:06:05 -07:00
readansi_test.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
readlinkat_test.c Make improvements 2022-04-24 10:06:05 -07:00
renameat_test.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
sched_getaffinity_test.c Wrap sched_getaffinity 2022-05-12 07:22:57 -07:00
seccomp_test.c Make improvements 2022-04-28 09:57:07 -07:00
setitimer_test.c Make signal handling work well across platforms 2022-03-25 07:28:57 -07:00
setrlimit_test.c Add syscalls to Blinkenlights and fix bugs 2022-05-13 13:31:21 -07:00
sigaction_test.c Make fixes and improvements 2022-05-19 16:57:49 -07:00
signal_test.c Improve locks and signals 2022-04-12 05:20:17 -07:00
sigprocmask_test.c Make improvements 2022-04-24 10:06:05 -07:00
sigsuspend_test.c Make improvements 2022-04-24 10:06:05 -07:00
stat_test.c Improve redbean 2022-04-25 08:30:14 -07:00
symlinkat_test.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
test.mk Add MODE=optlinux build mode (#141) 2021-10-14 19:36:49 -07:00
tkill_test.c Get threads working on all platforms 2022-05-13 03:59:09 -07:00
unlinkat_test.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
vfork_test.c Delete LIBC_CALLS_HEFTY 2021-02-02 22:17:53 -08:00
write_test.c Fix bugs with recent change 2022-04-16 10:40:23 -07:00
writev_test.c Improve memory safety 2021-10-13 17:27:13 -07:00