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:
Justine Tunney 2023-07-26 13:54:49 -07:00
parent 6843150e0c
commit 7e0a09feec
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
510 changed files with 1783 additions and 1483 deletions

View file

@ -36,7 +36,7 @@ struct magicu __magicu_get(uint32_t d) {
int a, p;
struct magicu magu;
uint32_t p32, q, r, delta;
_npassert(d); // Can't divide by zero.
npassert(d); // Can't divide by zero.
p32 = 0; // Avoid compiler warning.
a = 0; // Initialize "add" indicator.
p = 31; // Initialize p.
@ -60,9 +60,9 @@ struct magicu __magicu_get(uint32_t d) {
}
delta = d - 1 - r;
} while (p < 64 && p32 < delta);
magu.M = q + 1; // Magic number and
magu.s = p - 32; // Shift amount to return
if (a) magu.s |= 64; // Sets "add" indicator
_npassert(magu.M || magu.s); // Never returns zero.
magu.M = q + 1; // Magic number and
magu.s = p - 32; // Shift amount to return
if (a) magu.s |= 64; // Sets "add" indicator
npassert(magu.M || magu.s); // Never returns zero.
return magu;
}