1 #define IMAGE_MAGIC 0x0f0e0d0c
2 #define IMAGE_VERSION 4
7 /* all pointers in the image file are relocated from
8 relocation_base to here when the image is loaded */
9 CELL data_relocation_base;
12 /* code relocation base */
13 CELL code_relocation_base;
14 /* size of code heap */
16 /* tagged pointer to t singleton */
18 /* tagged pointer to bignum 0 */
20 /* tagged pointer to bignum 1 */
22 /* tagged pointer to bignum -1 */
24 /* Initial user environment */
25 CELL userenv[USER_ENV];
30 CELL ds_size, rs_size;
31 CELL gen_count, young_size, aging_size;
36 void load_image(F_PARAMETERS *p);
37 void init_objects(F_HEADER *h);
38 bool save_image(const F_CHAR *file);
40 DECLARE_PRIMITIVE(save_image);
41 DECLARE_PRIMITIVE(save_image_and_exit);
43 /* relocation base of currently loaded image's data heap */
44 CELL data_relocation_base;
46 INLINE void data_fixup(CELL *cell)
48 if(immediate_p(*cell))
51 F_ZONE *tenured = &data_heap->generations[TENURED];
52 *cell += (tenured->start - data_relocation_base);
55 CELL code_relocation_base;
57 INLINE void code_fixup(XT *cell)
59 CELL value = (CELL)*cell;
60 value += (code_heap.segment->start - code_relocation_base);