mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
4e9662cbc7
- Add FreeBSD-specific mmap() flags - Reduce size of the APE loader from 8kb to 4kb - Work towards fixing the Makefile build on WSL - Automate testing of APE no-modify-self behaviors - Make the ape.S shell script code cleaner and tinier - Improve the APE sanity check to test behavior better - Fixed issue with ShowCrashReports() sigaltstack() on BSDs - Delete symbols for S_MODE magnums which wasted compile time If you checked out yesterday's APE commit, please run: rm -f /usr/bin/ape o/tmp/ape /tmp/ape "${TMPDIR:-/tmp}/ape" Because this change fixes certain aspects of the new ABI. We don't have automated migrations for APE loader versions yet. Thanks! You can also download prebuilt binaries here: - https://justine.lol/ape.elf (Linux/FreeBSD/NetBSD/OpenBSD) - https://justine.lol/ape.macho (Apple) Install the appropriate one as `/usr/bin/ape`.
20 lines
462 B
C
20 lines
462 B
C
#ifndef COSMOPOLITAN_APE_LOADER_H_
|
|
#define COSMOPOLITAN_APE_LOADER_H_
|
|
|
|
#define APE_LOADER_BASE 0x200000
|
|
#define APE_LOADER_SIZE 0x200000
|
|
#define APE_LOADER_ENTRY 0x200400
|
|
#define APE_LOADER_BSS (PAGESIZE * 2)
|
|
#define APE_LOADER_STACK 0x7f0000000000
|
|
#define APE_BLOCK_BASE 0x7e0000000000
|
|
#define APE_BLOCK_SIZE 0x000200000000
|
|
|
|
struct ApeLoader {
|
|
int fd;
|
|
int os;
|
|
char *prog;
|
|
char *page;
|
|
void *syscall;
|
|
};
|
|
|
|
#endif /* COSMOPOLITAN_APE_LOADER_H_ */
|