mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-04 05:31:02 +00:00
Let's say you pass the `-M blink-mips.elf` flag to apelink, so that your ape binary will bundle a compressed build of blink, and the shell script will extract that binary and launch your program under it, if running on a MIPS system. However, for any given microprocessor architecture, we'll need a separate loader for each operating system. The issue is ELF OSABI isn't very useful. As an example, SerenityOS and Linux both have SYSV in the OSABI field. So to tell their binaries apart we'd have to delve into various other conventions, like special sections and PT_NOTE structures. To make things simple this change introduces the `-k OS` flag to apelink which generate shell script content that ensures `OS` matches `uname -s` before attempting to execute a loader. For example, you could say: apelink -k Linux -M blink-linux-arm.elf -M blink-linux-mips.elf \ -k Darwin -M blink-darwin-ppc.elf \ ... To introduce support for old 32-bit architectures on multiple OSes, when building your cosmo binary. |
||
---|---|---|
.. | ||
args | ||
build | ||
cosmocc | ||
curl | ||
decode | ||
emacs | ||
hello | ||
lambda | ||
net | ||
plinko | ||
scripts | ||
viz | ||
zsh | ||
BUILD.mk |