1: #ifndef NOVL
   2: #define NOVL    7
   3: 
   4: #define A_MAGIC1    0407        /* normal */
   5: #define A_MAGIC2    0410        /* read-only text */
   6: #define A_MAGIC3    0411        /* separated I&D */
   7: #define A_MAGIC4    0405        /* overlay */
   8: #define A_MAGIC5    0430        /* auto-overlay (nonseparate) */
   9: #define A_MAGIC6    0431        /* auto-overlay (separate)  */
  10: 
  11: #ifndef KERNEL
  12: struct  exec {
  13:     int         a_magic;    /* magic number */
  14:     unsigned    a_text;     /* size of text segment */
  15:     unsigned    a_data;     /* size of initialized data */
  16:     unsigned    a_bss;      /* size of uninitialized data */
  17:     unsigned    a_syms;     /* size of symbol table */
  18:     unsigned    a_entry;    /* entry point */
  19:     unsigned    a_unused;   /* not used */
  20:     unsigned    a_flag;     /* relocation info stripped */
  21: };
  22: struct  ovlhdr {
  23:     int     max_ovl;    /* maximum ovl size */
  24:     unsigned    ov_siz[NOVL];   /* size of i'th overlay */
  25: };
  26: 
  27: struct  nlist {
  28:     char        n_name[8];  /* symbol name */
  29:     int         n_type;     /* type flag */
  30:     unsigned    n_value;    /* value */
  31: };
  32: 
  33: /*
  34:  * Macros which take exec structures as arguments and tell whether
  35:  * the file has a reasonable magic number or offset to text.
  36:  */
  37: #define N_BADMAG(x) \
  38:     (((x).a_magic)!=A_MAGIC1 && ((x).a_magic)!=A_MAGIC2 && \
  39:      ((x).a_magic)!=A_MAGIC3 && ((x).a_magic)!=A_MAGIC4 && \
  40:      ((x).a_magic)!=A_MAGIC5 && ((x).a_magic)!=A_MAGIC6)
  41: 
  42: #define N_TXTOFF(x) \
  43:     ((x).a_magic==A_MAGIC5 || (x).a_magic==A_MAGIC6 ? \
  44:      sizeof (struct ovlhdr) + sizeof (struct exec) : sizeof (struct exec))
  45: 
  46:         /* values for type flag */
  47: #define N_UNDF  0   /* undefined */
  48: #define N_ABS   01  /* absolute */
  49: #define N_TEXT  02  /* text symbol */
  50: #define N_DATA  03  /* data symbol */
  51: #define N_BSS   04  /* bss symbol */
  52: #define N_TYPE  037 /* mask for type flag */
  53: #define N_REG   024 /* register name */
  54: #define N_FN    037 /* file name symbol */
  55: #define N_EXT   040 /* external bit, or'ed in */
  56: #define FORMAT  "%06o"  /* to print a value */
  57: #endif	KERNEL
  58: #endif	NOVL

Defined struct's

Defined macros

A_MAGIC4 defined in line 7; used 5 times
FORMAT defined in line 56; used 1 times
N_ABS defined in line 48; used 1 times
N_BSS defined in line 51; used 1 times
N_DATA defined in line 50; used 1 times
N_EXT defined in line 55; used 12 times
N_FN defined in line 54; never used
N_REG defined in line 53; never used
N_TEXT defined in line 49; used 3 times
N_TYPE defined in line 52; used 5 times
N_UNDF defined in line 47; used 2 times

Usage of this include

Last modified: 1983-08-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 963
Valid CSS Valid XHTML 1.0 Strict