cosmopolitan/libc/testlib
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
..
thunks Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
almostequal.c Change license 2020-12-27 17:18:44 -08:00
almostequalf.c Change license 2020-12-27 17:18:44 -08:00
almostequallongdouble.c Change license 2020-12-27 17:18:44 -08:00
bench.h Make numerous improvements 2021-09-28 01:52:34 -07:00
bench.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
benchrunner.c Improve system call support on NT 2022-04-07 20:30:04 -07:00
binequals.c Change license 2020-12-27 17:18:44 -08:00
blocktronics.h Improve performance of bitscanning intrinsics 2021-06-15 06:29:51 -07:00
blocktronics.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
blocktronics.txt Improve performance of bitscanning intrinsics 2021-06-15 06:29:51 -07:00
clearxmmregisters.c Change license 2020-12-27 17:18:44 -08:00
combo.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
comborunner.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
contains.c Change license 2020-12-27 17:18:44 -08:00
endswith.c Change license 2020-12-27 17:18:44 -08:00
ezbench.h Improve redbean 2022-04-25 08:30:14 -07:00
ezbenchcontrol.c Make numerous improvements 2021-09-28 01:52:34 -07:00
ezbenchreport.c Make numerous improvements 2021-09-28 01:52:34 -07:00
ezbenchwarn.c Make numerous improvements 2021-09-28 01:52:34 -07:00
fastrandomstring.h Improve Python tree-shaking 2021-09-06 19:24:10 -07:00
fixture.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
fixturerunner.c Get codebase completely working with LLVM 2021-02-09 02:57:32 -08:00
formatbinaryasglyphs.c Change license 2020-12-27 17:18:44 -08:00
formatbinaryashex.c Change license 2020-12-27 17:18:44 -08:00
formatbool.c Change license 2020-12-27 17:18:44 -08:00
formatfloat.c Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
formatint.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
formatrange.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
formatstr.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
getcore.c Make numerous improvements 2021-09-28 01:52:34 -07:00
getinterrupts.c Make numerous improvements 2021-09-28 01:52:34 -07:00
globals.c Change license 2020-12-27 17:18:44 -08:00
hexequals.c Change license 2020-12-27 17:18:44 -08:00
hyperion.h Make improvements to redbean 2021-07-10 15:19:37 -07:00
hyperion.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
hyperion.txt Initial import 2020-06-15 07:18:57 -07:00
incrementfailed.c Change license 2020-12-27 17:18:44 -08:00
moby.h Make improvements to redbean 2021-07-10 15:19:37 -07:00
moby.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
moby.txt Make improvements to redbean 2021-07-10 15:19:37 -07:00
polluteregisters.S Improve redbean 2022-04-25 08:30:14 -07:00
quota.c Make fixes and improvements 2022-05-19 16:57:49 -07:00
runner.c Flatten InfoZIP directory and fix build issues 2022-04-20 22:40:33 -07:00
shoulddebugbreak.c Change license 2020-12-27 17:18:44 -08:00
showerror.c Add syscalls to Blinkenlights and fix bugs 2022-05-13 13:31:21 -07:00
startswith.c Change license 2020-12-27 17:18:44 -08:00
strcaseequals.c Change license 2020-12-27 17:18:44 -08:00
strequals.c Change license 2020-12-27 17:18:44 -08:00
testcase.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
testlib.h Make improvements 2022-04-28 09:57:07 -07:00
testlib.mk Make exciting improvements 2022-03-18 03:02:00 -07:00
testmain.c Make some systemic improvements 2022-05-18 16:52:36 -07:00
testrunner.c Make improvements 2022-04-28 09:57:07 -07:00
thrashcodecache.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
ugly.h Support Linux binfmt_misc and APE loading on Apple 2022-05-21 09:28:25 -07:00
yield.c Make numerous improvements 2021-09-28 01:52:34 -07:00