Annotation of coherent/c/usr/include/l.out.h, revision 1.1.1.1

1.1       root        1: /* (-lgl
                      2:  *     COHERENT Version 3.0
                      3:  *     Copyright (c) 1982, 1990 by Mark Williams Company.
                      4:  *     All rights reserved. May not be copied without permission.
                      5:  -lgl) */
                      6: /*
                      7:  * This is the format of the 'l.out' file
                      8:  * (assembler output, linkage editor input and output).
                      9:  * It also has the namelist structure for the nlist routine.
                     10:  */
                     11: 
                     12: #ifndef         L_OUT_H
                     13: #define         L_OUT_H        L_OUT_H
                     14: 
                     15: #include <sys/types.h>
                     16: 
                     17: #define        NCPLN   16              /* Chars in loader name */
                     18: #define NLSEG  9               /* No. of segments */
                     19: #define        NXSEG   6               /* No. of segments used by exec */
                     20: #define        L_MAGIC 0407            /* Magic number */
                     21: 
                     22: /*
                     23:  * This is the header.
                     24:  * It sits at the front of the file,
                     25:  * holding control information and
                     26:  * the sizes of the other segments
                     27:  * of the file.
                     28:  */
                     29: struct ldheader {
                     30:        int     l_magic;        /* Magic number */
                     31:        int     l_flag;         /* Flags */
                     32:        int     l_machine;      /* Type of target machine */
                     33:        vaddr_t l_entry;        /* Entrypoint */
                     34:        fsize_t l_ssize[NLSEG]; /* Segment sizes */
                     35: };
                     36: 
                     37: /* Flags */
                     38: #define LF_SHR 01              /* Bound shared */
                     39: #define LF_SEP 02              /* Bound separated */
                     40: #define LF_NRB 04              /* No reloc. bits */
                     41: #define        LF_KER  010             /* Loadable driver */
                     42: 
                     43: /* Formats */
                     44: #define        AFMT    "%06o"          /* Address */
                     45: 
                     46: /* Machines */
                     47: #include <mtype.h>
                     48: 
                     49: /* Segments */
                     50: #define        L_SHRI  0               /* Shared Instruction space */
                     51: #define        L_PRVI  1               /* Private Instruction space */
                     52: #define        L_BSSI  2               /* Uninitialised Instruction */
                     53: #define        L_SHRD  3               /* Shared Data space */
                     54: #define        L_PRVD  4               /* Private Data space */
                     55: #define        L_BSSD  5               /* Uninitalised Data */
                     56: #define L_DEBUG 6              /* Debug tables */
                     57: #define L_SYM  7               /* Symbols */
                     58: #define L_REL  8               /* Relocation */
                     59: 
                     60: #define L_ABS  9               /* Absolute (symbol table) */
                     61: #define L_REF  10              /* Reference (symbol table) */
                     62: 
                     63: /*
                     64:  * Symbol.
                     65:  * These live in the 'L_SYM' section
                     66:  * of the file; the size of this section
                     67:  * determines the number of symbols.
                     68:  */
                     69: struct ldsym {
                     70:        char    ls_id[NCPLN];   /* Symbol name */
                     71:        int     ls_type;        /* Global + Seg. */
                     72:        vaddr_t 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:        int     n_type;         /* Type flag */
                     81:        unsigned 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
                     91:  * of relocation.
                     92:  */
                     93: 
                     94: #define LR_SEG 017             /* Seg., L_SYM => Sym. based */
                     95: #define LR_PCR 020             /* PC Rel. flag */
                     96: #define LR_OP  0340            /* Opcode */
                     97: 
                     98: #define LR_BYTE        (0<<5)          /* Rel. a byte */
                     99: #define LR_WORD        (1<<5)          /* Rel. a word */
                    100: 
                    101: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.