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