Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ stcu(3x) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stfe(3x)

stfd(3x)

sym.h(5)

stsupport.h(5)



     STCU(3X)                                                 STCU(3X)



     NAME
          stcu - routines that provide a compilation unit symbol table
          interface

     SYNOPSIS
          #include <syms.h>

          pCHDRR stcuinit ()

          void stsetchdr (pchdr)
          pCHDRR    pchdr;

          pCHDRR stcurrentpchdr()

          void stfree()

          long stextadd (iss, value, st, sc, index)
          long iss;
          long value;
          long st;
          long sc;
          long index;

          pEXTR stpextiext (iext)
          long iext;

          pEXTR stpextrndx (rndx)
          RNDXR rndx;

          long stiextmax()

          long stextstradd (str)
          char *str;

          char *ststrextiss (iss)
          long iss;

          long stidnindexfext (index, fext)
          long index;
          long fext;

          long stidnrndx (rndx)
          RNDXR rndx;

          pRNDXR stpdnidn (idn)
          long idn;
          RNDXR strndxidn (idn)
          long idn;

          void stsetidn (idndest, idnsrc)
          long idndest;
          long idnsrc;



     Page 1                                        (last mod. 8/20/87)





     STCU(3X)                                                 STCU(3X)



     DESCRIPTION
          The stcu routines provide an interface to objects that occur
          once per object rather than once per file descriptor (for
          example, external symbols, strings, and dense numbers).  The
          routines provide access to the current chdr (compile time
          hdr), which represents the symbol table in running processes
          with pointers to symbol table sections rather than indices
          and offsets used in the disk file representation.

          A new symbol table can be created with st_cuinit. This
          routine creates and initializes a CHDRR (see
          cmplrs/stsupport.h).  The CHDRR is the current chdr and is
          used in all later calls. NOTE: A chdr can also be created
          with the read routines (see stio.3). The st_cuinit routine
          returns a pointer to the new CHDRR record.

          st_currentchdr
                  Returns a pointer the current chdr.

          st_setchdr
                  Sets the current chdr to the pchdr argument and sets
                  the per file structures to reflect a change in
                  symbol tables.

          st_free Frees all constituent structures associated with the
                  current chdr.

          st_extadd
                  Lets you add to the externals table. It returns the
                  index to the new external for future reference and
                  use. The ifd field for the external is filled in by
                  the current file (see stfd.3).  For more details on
                  the parameters, see sym.h.

          st_pext_iext

          and st_pext_rndx
                  Returns pointers to the external, given a index
                  referencing them. The latter routine requires a
                  relative index where the index field should be the
                  index in external symbols and the rfd field should
                  be the constant ST_EXTIFD. NOTE:  The externals
                  contain the same structure as symbols (see the SYMR
                  and EXTR definitions).

          st_iextmax
                  Returns the current number of entries in the
                  external symbol table.

          The iss field in external symbols (the index into string
          space) must point into external string space.




     Page 2                                        (last mod. 8/20/87)





     STCU(3X)                                                 STCU(3X)



          st_extstradd
                  Adds a null-terminated string to the external string
                  space and returns its index.

          st_str_extiss
                  Converts that index into a pointer to the external
                  string.

          The dense number table provides a convenience to the code
          optimizer, generator, and assembler. This table lets them
          reference symbols from different files and externals with
          unique densely packed numbers.

          st_idn_index_fext
                  Returns a new dense number table index, given an
                  index into the symbol table of the current file (or
                  if fext is set, the externals table).

          st_idn_rndx
                  Returns a new dense number, but expects a RNDXR (see
                  sym.h) to specify both the file index and the symbol
                  index rather than implying the file index from the
                  current file.  The RNDXR contains two fields: an
                  index into the externals table and a file index
                  (rsyms can point into the symbol table, as well).
                  The file index is ST_EXTIFD (see stsupport.h) for
                  externals.

          st_rndx_idn
                  Returns a RNDX, given an index into the dense number
                  table.

          st_pdn_idn
                  Returns a pointer to the RNDXR index by the `idn'
                  argument.

          The programs must be loaded with the object file access
          routine library libmld.a.

     AUTHOR
          Mark I. Himelstein

     SEE ALSO
          stfe(3x), stfd(3x), sym.h(5), stsupport.h(5)

     ORIGIN
          MIPS Computer Systems








     Page 3                                        (last mod. 8/20/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026