cosmopolitan/ape
tkchia 3e0ddf70e9
Make shell script magic less prone to breakage (#643)
The metal boot sector code was wrapped in a single-quoted
string, like so:

    MZqFpD='
    ...MZ HEADER...
    ...E_LFANEW...
    ...BIOS BOOT SECTOR...'

This might break the shell code loader if the boot sector code
contains a 0x27 (single quote) byte.  This patch wraps the
boot sector code in a here-document instead:

    MZqFpD='
    ...MZ HEADER...' <<'@'
    ...E_LFANEW...
    ...BIOS BOOT SECTOR...
    @

This is harder to break — when interpreted as a shell script,
the code can only accidentally terminate the here-document
if there is a "\n@\n" sequence inside the BIOS boot portion.
2022-10-02 00:45:25 -07:00
..
public Improve open source compatibility 2022-09-08 03:19:35 -07:00
ape.lds Make shell script magic less prone to breakage (#643) 2022-10-02 00:45:25 -07:00
ape.mk Clean up threading code some more 2022-09-13 20:17:34 -07:00
ape.S Make shell script magic less prone to breakage (#643) 2022-10-02 00:45:25 -07:00
apeinstall.sh Add pledge.com for launching commands in a sandbox 2022-07-13 04:31:46 -07:00
apeuninstall.sh Fix some regressions with execution 2022-08-07 22:10:18 -07:00
config.h Improve memory safety 2021-10-13 17:27:13 -07:00
idata.internal.h Change support vector to Windows 8+ 2022-09-15 03:55:05 -07:00
loader-elf.S Work around Rosetta clobbering startup registers on M1 Macs (issue #429) (#453) 2022-06-27 16:28:59 -07:00
loader-macho.lds Write tests for new APE loader and fix bugs 2022-05-22 05:45:38 -07:00
loader-macho.S Work around Rosetta clobbering startup registers on M1 Macs (issue #429) (#453) 2022-06-27 16:28:59 -07:00
loader.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
loader.h Make some minor touchups for nightlies 2022-09-09 19:12:40 -07:00
loader.lds Add .PLEDGE/.CPU/.MEMORY/etc. to Landlock Make 1.2 2022-08-14 20:16:44 -07:00
macros.internal.h Enable CPU exception handling w/ IDT & TSS (#640) 2022-09-29 14:43:08 -07: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