diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-03-22 17:49:28 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-03-22 17:49:28 +0100 |
commit | 8caec8564d6221146e055937b6ae344a647c7c82 (patch) | |
tree | 2fe394982af83cc2cb80b2c82587bdbf3486811a /sys/src/9/port/sysproc.c | |
parent | 80658d6ccf522200c286f02e947f3c9d2afe7ea9 (diff) |
vl, libmach, kernel: mips has 16K alignment for segments (for bigpages)
Diffstat (limited to 'sys/src/9/port/sysproc.c')
-rw-r--r-- | sys/src/9/port/sysproc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/src/9/port/sysproc.c b/sys/src/9/port/sysproc.c index 4b26d0970..b2e017c12 100644 --- a/sys/src/9/port/sysproc.c +++ b/sys/src/9/port/sysproc.c @@ -284,9 +284,14 @@ sysexec(va_list list) text = l2be(exec.text); entry = l2be(exec.entry); if(n==sizeof(Exec) && (magic == AOUT_MAGIC)){ - if(magic == S_MAGIC){ + switch(magic){ + case S_MAGIC: text += 8; align = 0x200000ull; /* 2MB segment alignment for amd64 */ + break; + case V_MAGIC: + align = 0x4000ull; /* MIPS has 16K page alignment */ + break; } if(text >= (USTKTOP-USTKSIZE)-(UTZERO+sizeof(Exec)) || entry < UTZERO+sizeof(Exec) |