0.6.10.4:
[sbcl.git] / src / runtime / coreparse.c
index 9239489..7221bd0 100644 (file)
  * files for more information.
  */
 
-/*
- * $Header$
- */
-
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/file.h>
@@ -31,6 +27,8 @@
 #include "runtime.h"
 #include "globals.h"
 #include "core.h"
+#include "arch.h"
+#include "interr.h"
 #include "sbcl.h"
 
 static void process_directory(int fd, long *ptr, int count)
@@ -66,7 +64,7 @@ static void process_directory(int fd, long *ptr, int count)
        switch (id) {
        case DYNAMIC_SPACE_ID:
            if (addr != (os_vm_address_t)DYNAMIC_SPACE_START) {
-               lose("incorrect dynamic space");
+               lose("core/runtime address mismatch: DYNAMIC_SPACE_START");
            }
 #if defined(ibmrt) || defined(__i386__)
            SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer);
@@ -75,10 +73,14 @@ static void process_directory(int fd, long *ptr, int count)
 #endif
            break;
        case STATIC_SPACE_ID:
-           static_space = (lispobj *) addr;
+           if (addr != (os_vm_address_t)STATIC_SPACE_START) {
+               lose("core/runtime address mismatch: STATIC_SPACE_START");
+           }
            break;
        case READ_ONLY_SPACE_ID:
-           /* We don't care about read-only space. */
+           if (addr != (os_vm_address_t)READ_ONLY_SPACE_START) {
+               lose("core/runtime address mismatch: READ_ONLY_SPACE_START");
+           }
            break;
        default:
            lose("unknown space ID %ld", id);
@@ -92,7 +94,7 @@ lispobj load_core_file(char *file)
 
     /* KLUDGE: This kind of conditionalization everywhere that 32-bit
      * ints are used is really nasty. It would be much nicer to define
-     * a typedef a la addr_as_int once and for all in each
+     * a typedef like addr_as_int once and for all in each
      * architecture file, then use that everywhere. -- WHN 19990904 */
 #ifndef alpha
     long header[CORE_PAGESIZE / sizeof(long)], val, len, *ptr;