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