|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 3.2.2 ! 3: * Copyright (c) 1982, 1992 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * l.out.h ! 8: * This defines the format of the 'l.out' file ! 9: * (assembler output, linkage editor input and output). ! 10: * It also gives the namelist structure for the nlist routine. ! 11: */ ! 12: ! 13: #ifndef L_OUT_H ! 14: #define L_OUT_H L_OUT_H ! 15: ! 16: #include <sys/types.h> ! 17: ! 18: #define NCPLN 16 /* Chars in loader name */ ! 19: #define NLSEG 9 /* No. of segments */ ! 20: #define NXSEG 6 /* No. of segments used by exec */ ! 21: #define L_MAGIC 0407 /* Magic number */ ! 22: ! 23: /* ! 24: * Header. ! 25: * This lives at the front of the file and gives control information ! 26: * and the sizes of the other segments of the file. ! 27: */ ! 28: struct ldheader { ! 29: short l_magic; /* Magic number */ ! 30: short l_flag; /* Flags */ ! 31: short l_machine; /* Type of target machine */ ! 32: unsigned short l_entry; /* Entrypoint */ ! 33: fsize_t l_ssize[NLSEG]; /* Segment sizes */ ! 34: }; ! 35: ! 36: /* Flags. */ ! 37: #define LF_SHR 01 /* Bound shared */ ! 38: #define LF_SEP 02 /* Bound separated */ ! 39: #define LF_NRB 04 /* No reloc. bits */ ! 40: #define LF_KER 010 /* Loadable driver */ ! 41: ! 42: #define LF_286 0 /* dummy mode [386/exec.c] */ ! 43: #define LF_386 0x80000000 /* dummy mode [386/exec.c] */ ! 44: ! 45: /* Formats. */ ! 46: #define AFMT "%06o" /* Address */ ! 47: ! 48: /* Machines. */ ! 49: #include <mtype.h> ! 50: ! 51: /* Segments. */ ! 52: #define L_SHRI 0 /* Shared Instruction space */ ! 53: #define L_PRVI 1 /* Private Instruction space */ ! 54: #define L_BSSI 2 /* Uninitialized Instruction */ ! 55: #define L_SHRD 3 /* Shared Data space */ ! 56: #define L_PRVD 4 /* Private Data space */ ! 57: #define L_BSSD 5 /* Uninitialized Data space */ ! 58: #define L_DEBUG 6 /* Debug tables */ ! 59: #define L_SYM 7 /* Symbols */ ! 60: #define L_REL 8 /* Relocation */ ! 61: #define L_ABS 9 /* Absolute (symbol table) */ ! 62: #define L_REF 10 /* Reference (symbol table) */ ! 63: ! 64: /* ! 65: * Symbols. ! 66: * These live in the 'L_SYM' section of the file; ! 67: * the size of this section determines the number of symbols. ! 68: */ ! 69: struct ldsym { ! 70: char ls_id[NCPLN]; /* Symbol name */ ! 71: short ls_type; /* Global + Seg. */ ! 72: unsigned short ls_addr; /* Value of symbol */ ! 73: }; ! 74: ! 75: /* ! 76: * The nlist structure for the nlist routine. ! 77: */ ! 78: struct nlist { ! 79: char n_name[NCPLN]; /* Symbol name */ ! 80: short n_type; /* Type flag */ ! 81: unsigned short n_value; /* Value */ ! 82: }; ! 83: ! 84: #define L_GLOBAL 020 ! 85: ! 86: /* ! 87: * Relocation. ! 88: * Relocation is a byte stream. ! 89: * The first is an opcode. ! 90: * The next two bytes are the address of relocation. ! 91: */ ! 92: ! 93: #define LR_SEG 017 /* Seg., L_SYM => Sym. based */ ! 94: #define LR_PCR 020 /* PC Rel. flag */ ! 95: #define LR_OP 0340 /* Opcode */ ! 96: ! 97: #define LR_BYTE (0<<5) /* Rel. a byte */ ! 98: #define LR_WORD (1<<5) /* Rel. a word */ ! 99: ! 100: #endif ! 101: ! 102: /* end of l.out.h */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.