cosmopolitan/ape
Jōshin 7d31fc311a
Loaders rewrite argv[0] for old binaries (#1170)
For this to work, a loader has to be able to tell the difference between
an ‘old’ and a ‘new’ binary. This is achieved via a repurposing of ELF’s
e_flags field. We previously tried to use the padding in e_ident for it,
but binutils was resetting it to zero in e.g. strip.

This introduces one new ELF flag for cosmopolitan binaries. It is called
`EF_APE_MODERN`. We choose 0x101ca75, "lol cat 5".

It should now be safe to install the ape loader binfmt registration with
the `P` flag.
2024-05-07 20:42:18 -04:00
..
public Improve open source compatibility 2022-09-08 03:19:35 -07:00
aarch64.lds Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
ape-m1.c Loaders rewrite argv[0] for old binaries (#1170) 2024-05-07 20:42:18 -04:00
ape.h Mint APE Loader v1.10 2023-12-31 11:43:13 -08:00
ape.internal.h Get aarch64 hello world working 2023-05-10 04:20:47 -07:00
ape.lds Shave 4kb off each binary 2024-02-25 11:11:34 -08:00
ape.S Loaders rewrite argv[0] for old binaries (#1170) 2024-05-07 20:42:18 -04:00
apeinstall.sh Fix regression in apeinstall.sh (#1161) 2024-04-29 20:40:38 -07:00
apeuninstall.sh Remove feature for embedding blink in ape scripts 2024-01-26 22:30:56 -08:00
BUILD.mk Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
idata.internal.h flip et / noet in modelines 2023-12-07 22:17:11 -05:00
launch.S aarch64 loader passes os (#1042) 2023-12-31 06:42:36 -08:00
loader-macho.S Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
loader.c Loaders rewrite argv[0] for old binaries (#1170) 2024-05-07 20:42:18 -04:00
loader.lds more modeline errata (#1019) 2023-12-16 23:07:10 -05:00
macros.internal.h Delete some dead code 2024-01-01 00:13:16 -08:00
mz.ansi Initial import 2020-06-15 07:18:57 -07:00
notice.inc Initial import 2020-06-15 07:18:57 -07:00
relocations.h Optimize memory layout 2022-09-12 04:26:52 -07:00
sections.internal.h Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
start.S Fix more vi modelines (#1006) 2023-12-13 02:28:11 -05:00
systemcall.S Fix more vi modelines (#1006) 2023-12-13 02:28:11 -05:00