Annotation of researchv9/jerq/sgs/ld/globs.c, revision 1.1

1.1     ! root        1: static char ID[] = "@(#) globs.c: 1.11 8/18/83";
        !             2: #include "system.h"
        !             3: 
        !             4: #include <stdio.h>
        !             5: #include "structs.h"
        !             6: 
        !             7: #if !ONEPROC || TRVEC
        !             8: #include "tv.h"
        !             9: #include "ldtv.h"
        !            10: #endif
        !            11: 
        !            12: #include "paths.h"
        !            13: #include "params.h"
        !            14: 
        !            15: /*
        !            16:  * This include file is the complement of "extrns.h" and
        !            17:  * should be changed whenever extrns.h is changed.
        !            18:  */
        !            19: 
        !            20: 
        !            21: 
        !            22: int lineno;            /* current line number in ifile being parsed */
        !            23: char *curfilnm;                /* ptr to current input file name            */
        !            24: 
        !            25: char   aflag = 0,      /* file is to be "absolute"             */
        !            26:        cflag = 0,      /* perform only a partial execution     */
        !            27:        dflag = 0,      /* turn on debug output                 */
        !            28:        iflag = 0,      /* ** b16ld/x86ld *** separate I and D  */
        !            29:        mflag = 0,      /* generate a memory map                */
        !            30:        rflag = 0,      /* mark the object file as relocatable  */
        !            31:        sflag = 0,      /* strip relocation/line/symbol info    */
        !            32:        tvflag = 0,     /* * b16ld/x86ld/n3bld * tv linkage     */
        !            33: #if UNIX || XL
        !            34:        xflag = 0,      /* do not preserve local symbols        */
        !            35: #endif
        !            36: #if COMMON
        !            37:        tflag = 0,      /* do type checking, if on              */
        !            38:        Mflag = 0,      /* msg for multiply defnd external defs */
        !            39: #endif
        !            40: #if PAGING
        !            41:        Fflag = 0,      /* do blocking, memory configuration, etc
        !            42:                           as needed for paging, if on          */
        !            43: #endif
        !            44: #if PAGING
        !            45:        zflag = 0,      /* do not use memory around zero, if on */
        !            46: #endif
        !            47: #if ILDOPT
        !            48:        ildflag = 0,    /* do not output .i_l_dxx sections      */
        !            49: #endif
        !            50:        Hflag = 0,      /* "Hide" global symbols by converting them
        !            51:                           into variables of type "static"      */
        !            52:        Nflag = 0,      /* squash text and data together, turn off -n */
        !            53:        Sflag = 0,      /* "silent" running mode: issue messages
        !            54:                           only for fatal errors                */
        !            55:        Vflag = 0;      /* echo version information about ld    */
        !            56: int    hflag = 0,      /* size reserved for optional header    */
        !            57:        pflag = 0,      /* size reserved for patch list         */
        !            58:        Bflag = 0;      /* generate "padding" output sections   */
        !            59: unsigned short VSflag = 0;     /* put version stamp in optional hdr */
        !            60: 
        !            61: short usrdeftv = 0;    /* .tv input or SECTION                 */
        !            62: short globfill = 0;    /* default fill value */
        !            63: short errlev = 0;      /* error level generated during the ld run */
        !            64: 
        !            65: #if PAGING
        !            66: short bond_t_d = 0;    /* set by dfltsec to indicate to pboslist that text
        !            67:                                and data must be properly bonded for paging */
        !            68: #endif
        !            69: 
        !            70: #if FLEXNAMES          /* this implies PORTAR */
        !            71: long stroffset = 4L;   /* offset of string in string table (4 is for length) */
        !            72: long tnumsyms;                 /* total number of symbols in output file */
        !            73: #endif
        !            74: #if PORTAR
        !            75: long ar_size;                  /* size of archive .o */
        !            76: #endif
        !            77: 
        !            78: 
        !            79: /*
        !            80:  * Lists built during PASS 1, from user input
        !            81:  */
        !            82: 
        !            83: struct listown symlist;                /* head of the symbol list      */
        !            84: struct listown memlist;                /* head of the MEMLIST          */
        !            85: struct listown reglist;                /* head of the REGLIST          */
        !            86: struct listown ldfilist;       /* head of the LDFILE List      */
        !            87: struct listown bldoutsc;       /* head of the BLDOUTSEC List   */
        !            88: struct listown explist;                /* head of the expression List  */
        !            89: 
        !            90: #if !ONEPROC
        !            91: int symcnt, memcnt, regcnt,    /* list counts, used in  */
        !            92:     ldfcnt, bldcnt, expcnt, tvslotcnt; /* transfering the lists */
        !            93: #endif
        !            94: 
        !            95: #if !ONEPROC || TRVEC
        !            96: TVASSIGN *tvslot1;             /* ptr to head of tv slot list */
        !            97: #endif
        !            98: 
        !            99: 
        !           100: /*
        !           101:  * Lists built during PASS 2, from information obtained in PASS 1
        !           102:  */
        !           103: 
        !           104: struct listown bondlist;       /* head of the BONDLIST         */
        !           105: struct listown ownlist;                /* head of the OWNLIST          */
        !           106: struct listown atownlst;       /* head of the ATTOWN List      */
        !           107: struct listown infilist;       /* head of the INFILE List      */
        !           108: struct listown outsclst;       /* head of the OUTSEC List      */
        !           109: struct listown avlist;         /* head of available space list */
        !           110: struct listown dsectlst;       /* head of DSECT list           */
        !           111: 
        !           112: char outfilnm[128] = A_OUT;    /* name of output object file */
        !           113: 
        !           114: #if !ONEPROC
        !           115: char trnname[sizeof(TMPDIR)+20];       /* name of PASS1 -> PASS2 */
        !           116: FILE *trnfdes;                         /* "transfer" file        */
        !           117: #if AR16WR
        !           118: char *trnfbuf = NULL;
        !           119: #endif
        !           120: #endif
        !           121: 
        !           122: char *strbase,                 /* global save area for input ifile  */
        !           123:      *strnext,                 /* names, input *.o and archive file */
        !           124:      *strlimit;                        /* names                             */
        !           125: int strleng;
        !           126: 
        !           127: char epsymbol[8] = "";         /* a.out header entry point symbol */
        !           128: 
        !           129: int numoutsc;                  /* number of output sections */
        !           130: long cur_dot = -1L;            /* current value of "dot" symbol
        !           131:                                 *      -1L indicates no value.
        !           132:                                 */
        !           133: 
        !           134: ACTITEM *curexp;               /* current expression being evaluated */
        !           135: 
        !           136: long maxlcsms;                 /* max no. of local symbols for an input file */
        !           137: 
        !           138: long symtborg;                 /* file address of symbol table in output file*/
        !           139: 
        !           140: long   allocspc = 0L;          /* amount of space allocated by myalloc */
        !           141: long   maxalloc = 0L;          /* maximum allocated at any time        */
        !           142: #if DMERT || XL
        !           143: int    dmertplib = 0;          /* DMERT public library                 */
        !           144: #endif
        !           145: 
        !           146: ADDRESS memorg = MEMORG;               /* beginning of configured memory */
        !           147: char   stat_name[9]    =       { '\0','\0','\0','\0','\0','\0','\0','\0','\0'};

unix.superglobalmegacorp.com

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