00001 /* noff.h 00002 * Data structures defining the Nachos Object Code Format 00003 * 00004 * Basically, we only know about three types of segments: 00005 * code (read-only), initialized data, and unitialized data 00006 */ 00007 00008 #define NOFFMAGIC 0xbadfad /* magic number denoting Nachos 00009 * object code file 00010 */ 00011 00012 typedef struct segment { 00013 int virtualAddr; /* location of segment in virt addr space */ 00014 int inFileAddr; /* location of segment in this file */ 00015 int size; /* size of segment */ 00016 } Segment; 00017 00018 typedef struct noffHeader { 00019 int noffMagic; /* should be NOFFMAGIC */ 00020 Segment code; /* executable code segment */ 00021 Segment initData; /* initialized data segment */ 00022 #ifdef RDATA 00023 Segment readonlyData; /* read only data */ 00024 #endif 00025 Segment uninitData; /* uninitialized data segment -- 00026 * should be zero'ed before use 00027 */ 00028 } NoffHeader;