Create variables for page size

This commit is contained in:
Justine Tunney 2024-07-18 21:02:59 -07:00
parent 23dfb79d33
commit 567d8fe32d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
34 changed files with 137 additions and 101 deletions

View file

@ -66,6 +66,8 @@ extern char ape_stack_prot[] __attribute__((__weak__));
extern pthread_mutex_t __mmi_lock_obj;
extern int hostos asm("__hostos");
void __pagesize_init(unsigned long *auxv);
static const char *DecodeMagnum(const char *p, long *r) {
int k = 0;
unsigned long c, x = 0;
@ -164,6 +166,7 @@ wontreturn textstartup void cosmo(long *sp, struct Syslib *m1, char *exename,
__pid = sys_getpid().ax;
// initialize file system
__pagesize_init(auxv);
__maps_init();
__init_fds(argc, argv, envp);
@ -172,13 +175,6 @@ wontreturn textstartup void cosmo(long *sp, struct Syslib *m1, char *exename,
__enable_tls();
#if 0
#if IsAsan()
// TODO(jart): Figure out ASAN data model on AARCH64.
__asan_init(argc, argv, envp, auxv);
#endif
#endif
_init();
// initialize program
#if SYSDEBUG