mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Mint APE Loader v1.5
This change ports APE Loader to Linux AARCH64, so that Raspberry Pi users can run programs like redbean, without the executable needing to modify itself. Progress has also slipped into this change on the issue of making progress better conforming to user expectations and industry standards regarding which symbols we're allowed to declare
This commit is contained in:
parent
6843150e0c
commit
7e0a09feec
510 changed files with 1783 additions and 1483 deletions
|
@ -30,7 +30,7 @@ struct DosArgv {
|
|||
wint_t wc;
|
||||
};
|
||||
|
||||
textwindows noasan void DecodeDosArgv(int ignore, struct DosArgv *st) {
|
||||
textwindows dontasan void DecodeDosArgv(int ignore, struct DosArgv *st) {
|
||||
wint_t x, y;
|
||||
for (;;) {
|
||||
if (!(x = *st->s++)) break;
|
||||
|
@ -46,7 +46,7 @@ textwindows noasan void DecodeDosArgv(int ignore, struct DosArgv *st) {
|
|||
st->wc = x;
|
||||
}
|
||||
|
||||
static textwindows noasan void AppendDosArgv(wint_t wc, struct DosArgv *st) {
|
||||
static textwindows dontasan void AppendDosArgv(wint_t wc, struct DosArgv *st) {
|
||||
uint64_t w;
|
||||
w = _tpenc(wc);
|
||||
do {
|
||||
|
@ -55,7 +55,7 @@ static textwindows noasan void AppendDosArgv(wint_t wc, struct DosArgv *st) {
|
|||
} while (w >>= 8);
|
||||
}
|
||||
|
||||
static textwindows noasan int Count(int c, struct DosArgv *st) {
|
||||
static textwindows dontasan int Count(int c, struct DosArgv *st) {
|
||||
int ignore, n = 0;
|
||||
asm("" : "=g"(ignore));
|
||||
while (st->wc == c) {
|
||||
|
@ -82,8 +82,8 @@ static textwindows noasan int Count(int c, struct DosArgv *st) {
|
|||
// @see test/libc/dosarg_test.c
|
||||
// @see libc/runtime/ntspawn.c
|
||||
// @note kudos to Simon Tatham for figuring out quoting behavior
|
||||
textwindows noasan int GetDosArgv(const char16_t *cmdline, char *buf,
|
||||
size_t size, char **argv, size_t max) {
|
||||
textwindows dontasan int GetDosArgv(const char16_t *cmdline, char *buf,
|
||||
size_t size, char **argv, size_t max) {
|
||||
bool inquote;
|
||||
int i, argc, slashes, quotes, ignore;
|
||||
static struct DosArgv st_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue