1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 /* static char sccsid[] = "@(#)objfmt.h 1.5 03/06/81"; */ 4 5 #ifdef OBJ 6 /* 7 * the creation time, the size and the magic number of the obj file 8 */ 9 struct pxhdr { 10 long maketime; 11 long objsize; 12 short magicnum; 13 }; 14 15 # define HEADER_BYTES 1024 /* the size of px_header */ 16 # define PX_HEADER "/usr/lib/px_header" /* px_header's name */ 17 # define PI_COMP "/usr/ucb/pi" /* the compiler's name */ 18 # define PX_INTRP "/usr/ucb/px" /* the interpreter's name */ 19 # define INDX 1 /* amt to shift display index */ 20 #endif OBJ 21 22 /* 23 * the file of error messages created by mkstr 24 */ 25 #ifdef OBJ 26 # define ERR_STRNGS "/usr/lib/pi2.0strings" 27 # define ERR_PATHLEN 9 28 # define HOW_STRNGS "/usr/lib/how_pi\0" 29 # define HOW_PATHLEN 9 30 #endif OBJ 31 #ifdef PC 32 # define ERR_STRNGS "/usr/lib/pc2.0strings" 33 # define ERR_PATHLEN 9 34 # define HOW_STRNGS "/usr/lib/how_pc\0" 35 # define HOW_PATHLEN 9 36 #endif PC 37 38 /* 39 * these are because of varying sizes of pointers 40 */ 41 #ifdef VAX 42 # define PTR_AS O_AS4 43 # define PTR_RV O_RV4 44 # define PTR_IND O_IND4 45 # define PTR_CON O_CON4 46 # define PTR_DUP O_SDUP4 47 # define PTR_DCL unsigned long /* for pointer variables */ 48 # define SHORTADDR 32768 /* maximum short address */ 49 # define TOOMUCH 65536 /* maximum variable size */ 50 # define MAXSET 65536 /* maximum set size */ 51 /* 52 * Offsets due to the structure of the runtime stack. 53 * DPOFF1 is the amount of fixed storage in each block allocated 54 * as local variables for the runtime system. 55 * since locals are allocated negative offsets, 56 * -DPOFF1 is the last used implicit local offset. 57 * DPOFF2 is the size of the block mark. 58 * since arguments are allocated positive offsets, 59 * DPOFF2 is the end of the implicit arguments. 60 * for obj, the first argument has the highest offset 61 * from the stackpointer. and the block mark is an 62 * implicit last parameter. 63 * for pc, the first argument has the lowest offset 64 * from the argumentpointer. and the block mark is an 65 * implicit first parameter. 66 */ 67 # ifdef OBJ 68 # define DPOFF1 0 69 # define DPOFF2 32 70 # define INPUT_OFF -8 /* offset of `input' */ 71 # define OUTPUT_OFF -4 /* offset of `output' */ 72 # endif OBJ 73 # ifdef PC 74 # define DPOFF1 ( sizeof rtlocs - sizeof rtlocs.unwind ) 75 # define DPOFF2 ( sizeof (long) ) 76 # define INPUT_OFF 0 77 # define OUTPUT_OFF 0 78 # endif PC 79 # define MAGICNUM 0403 /* obj magic number */ 80 #endif VAX 81 82 #ifdef PDP11 83 # define PTR_AS O_AS2 84 # define PTR_RV O_RV2 85 # define PTR_IND O_IND2 86 # define PTR_CON O_CON2 87 # define PTR_DUP O_SDUP2 88 # define PTR_DCL char * 89 # define TOOMUCH 50000 90 # define SHORTADDR 65536 91 # define MAXSET 65536 /* maximum set size */ 92 # define DPOFF1 0 93 # define DPOFF2 18 /* sizeof(struct stack) */ 94 # define INPUT_OFF -2 95 # define OUTPUT_OFF -4 96 # define MAGICNUM 0404 97 #endif PDP11 98