- sdata = (vm_offset_t) sectDATAB;
- edata = (vm_offset_t) sectDATAB + sectSizeDATA;
-
-#if DEBUG
- kprintf("sectTEXTB = %p\n", sectTEXTB);
- kprintf("sectDATAB = %p\n", sectDATAB);
- kprintf("sectOBJCB = %p\n", sectOBJCB);
- kprintf("sectLINKB = %p\n", sectLINKB);
- kprintf("sectHIBB = %p\n", sectHIBB);
- kprintf("sectPRELINKB = %p\n", sectPRELINKB);
- kprintf("eHIB = %p\n", (void *) eHIB);
- kprintf("stext = %p\n", (void *) stext);
- kprintf("etext = %p\n", (void *) etext);
- kprintf("sdata = %p\n", (void *) sdata);
- kprintf("edata = %p\n", (void *) edata);
-#endif
+ sdata = segDATAB;
+ edata = segDATAB + segSizeDATA;
+
+ sectCONSTB = (vm_offset_t) sectDCONST->addr;
+ sectSizeConst = sectDCONST->size;
+ sconstdata = sectCONSTB;
+ econstdata = sectCONSTB + sectSizeConst;
+
+ if (sectSizeConst & PAGE_MASK) {
+ kernel_section_t *ns = nextsect(segDATA, sectDCONST);
+ if (ns && !(ns->addr & PAGE_MASK))
+ doconstro_override = TRUE;
+ } else
+ doconstro_override = TRUE;
+
+ DBG("segTEXTB = %p\n", (void *) segTEXTB);
+ DBG("segDATAB = %p\n", (void *) segDATAB);
+ DBG("segLINKB = %p\n", (void *) segLINKB);
+ DBG("segHIBB = %p\n", (void *) segHIBB);
+ DBG("segPRELINKB = %p\n", (void *) segPRELINKB);
+ DBG("segPRELINKINFOB = %p\n", (void *) segPRELINKINFOB);
+ DBG("sHIB = %p\n", (void *) sHIB);
+ DBG("eHIB = %p\n", (void *) eHIB);
+ DBG("stext = %p\n", (void *) stext);
+ DBG("etext = %p\n", (void *) etext);
+ DBG("sdata = %p\n", (void *) sdata);
+ DBG("edata = %p\n", (void *) edata);
+ DBG("sconstdata = %p\n", (void *) sconstdata);
+ DBG("econstdata = %p\n", (void *) econstdata);
+ DBG("kernel_top = %p\n", (void *) &last_kernel_symbol);
+
+ vm_kernel_base = sHIB;
+ vm_kernel_top = (vm_offset_t) &last_kernel_symbol;
+ vm_kernel_stext = stext;
+ vm_kernel_etext = etext;
+ vm_prelink_stext = segPRELINKB;
+ vm_prelink_etext = segPRELINKB + segSizePRELINK;
+ vm_prelink_sinfo = segPRELINKINFOB;
+ vm_prelink_einfo = segPRELINKINFOB + segSizePRELINKINFO;
+ vm_slinkedit = segLINKB;
+ vm_elinkedit = segLINKB + segSizePRELINK;