|
@@ -1178,7 +1178,7 @@ DBG(
|
|
* but prepaged if EXAC
|
|
* but prepaged if EXAC
|
|
*/
|
|
*/
|
|
// TODO: Just use the program header instead of these other things.
|
|
// TODO: Just use the program header instead of these other things.
|
|
- img = attachimage(SG_TEXT|SG_RONLY, chan, m->externup->color, textaddr, (textlim-textaddr)/BIGPGSZ);
|
|
|
|
|
|
+ img = attachimage(SG_TEXT|SG_RONLY, chan, m->externup->color, textaddr, (dataddr-textaddr)/BIGPGSZ);
|
|
s = img->s;
|
|
s = img->s;
|
|
s->ph = d.e.ph[f.it];
|
|
s->ph = d.e.ph[f.it];
|
|
m->externup->seg[TSEG] = s;
|
|
m->externup->seg[TSEG] = s;
|
|
@@ -1208,11 +1208,11 @@ DBG(
|
|
s = m->externup->seg[ESEG];
|
|
s = m->externup->seg[ESEG];
|
|
m->externup->seg[ESEG] = nil;
|
|
m->externup->seg[ESEG] = nil;
|
|
|
|
|
|
- /* MMAP region. Put it at 512GiB for now. */
|
|
|
|
|
|
+ /* MMAP region. Put it at 512GiB for now.
|
|
m->externup->seg[ESEG] = newseg(SG_MMAP, 512 * GiB, 1);
|
|
m->externup->seg[ESEG] = newseg(SG_MMAP, 512 * GiB, 1);
|
|
if (0) print("mmap ESEG is %p\n", m->externup->seg);
|
|
if (0) print("mmap ESEG is %p\n", m->externup->seg);
|
|
m->externup->seg[ESEG]->color= m->externup->color;
|
|
m->externup->seg[ESEG]->color= m->externup->color;
|
|
-
|
|
|
|
|
|
+*/
|
|
m->externup->seg[SSEG] = s;
|
|
m->externup->seg[SSEG] = s;
|
|
/* the color of the stack was decided when we created it before,
|
|
/* the color of the stack was decided when we created it before,
|
|
* it may have nothing to do with the color of other segments.
|
|
* it may have nothing to do with the color of other segments.
|