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