stfd.3

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 210 行

3
210
字号
.TH stfd 3 RISC.SH Namestfd, st_currentifd, st_ifdmax, st_setfd, st_fdadd, st_symadd, st_auxadd, st_stradd, st_lineadd, st_pdadd, st_ifd_pcfd, st_pcfd_ifd, st_psym_ifd_isym, st_paux_ifd_iaux, st_paux_iaux, st_str_iss, st_str_ifd_iss, st_ppd_ifd_isym, st_malloc  \- routines that provide access to per file descriptor section of thesymbol table.SH Syntax.nf.B #include <syms.h>.PP.ft Blong st_currentifd ().PP.ft Blong st_ifdmax ().PP.ft Bvoid st_setfd (ifd)long ifd;.PP.ft Blong st_fdadd (filename)char *filename;.PP.ft Blong st_symadd (iss, value, st, sc, freloc, index)long iss;long value;long st;long sc;long freloc;long index;.PP.ft Blong st_auxadd (aux)AUXU aux;.PP.ft Blong st_stradd (cp)char *cp;.PP.ft Blong st_lineadd (line)long line;.PP.ft Blong st_pdadd (isym)long isym;.PP.ft Blong st_ifd_pcfd (pcfd1)pCFDR pcfd1;.PP.ft BpCFDR st_pcfd_ifd (ifd)long ifd;.PP.ft BpSYMR st_psym_ifd_isym (ifd, isym)long ifd;long isym;.PP.ft BpAUXU st_paux_ifd_iaux (ifd, iaux)long ifd;long iaux;.PP.ft BpAUXU st_paux_iaux (iaux)long iaux;.PP.ft Bchar *st_str_iss (iss)long iss;.PP.ft Bchar *st_str_ifd_iss (ifd, iss)long ifd;long iss;.PP.ft BpPDR st_ppd_ifd_isym (ifd, isym)long ifd;long isym;.PP.ft Bchar * st_malloc (ptr,psize,itemsize,baseitems)char *ptr;long *size;long itemsize;long baseitems;.PP.ft B.fi.ft R.br.SH DescriptionThe.B stfdroutines provide an interface to objects handled on a per filedescriptor (or fd) level.  For example: local symbols, auxiliaries, local strings, line numbers, optimizationentries, procedure descriptor entries, and the file descriptors.These routines constitute a group because they deal withobjects corresponding to fields in the.I FDRstructure..PPA fd can be activated by reading an existing one into memory or bycreating a new one.The compilation unit routines.I st_readbinaryand.I st_readstread file descriptors and their constituent partsinto memory from a symbol table on disk..PPThe.I st_fdaddadds a file descriptor to the list of file descriptors. The .I langfield is initialized from a user specified global .I st_lang that should be set to a constant designated for the language in .I symconst.h. The.I fMergefield is initialized from the user specified global st_merge that specifieswhether the file is to start with the attribute of being ableto be merged with identical files at load time. The.I fBigendianfield is initialized by the .MS gethostsex 3  routine, which determines thepermanent byte ordering for the auxiliary and line number entries for this file..PPThe.I st_fdadd adds the null string to the new files string table that isaccessible by the constant issNull (0.  It also adds the filename to thestring table and sets the.I rssfield. Finally, the current file is set to the newly added file so thatlater calls operate on that file..PPAll routines for fd-level objects handle only the current fileunless a file index is specified. The current file can also be set with.I st_setfd..PPPrograms can find the current file by calling.I st_currentifd,which returns the current index. Programs can find the number offiles by calling.I st_ifdmax.The fd routines only require working with indices to do most things.They allow more in-depth manipulation by allowing users to get thecompile time file descriptor.I (CFDRsee .I stsupport.h) that contains memory pointers to the per file tables (ratherthan indices or offsets used in disk files). Users can retrieve a pointer to the CFDR by calling.I st_pcfd_ifdwith the index to the desired file. The inverse mapping.I st_ifd_pcfdexists, as well. .PPEach of fd's constituent parts has an add routine:.I st_symadd,.I st_stradd,.I st_lineadd,.I st_pdadd,and.I st_auxadd. The parameters of the add routines correspond to the fields of theadded object (see \fIsym.h\fR). The \fIpdadd\fR routine lets users fill inthe isym field only. Further information can be added by directly accessingthe procedure descriptor entry. .PPThe add routines return an index that canbe used to retrieve a pointer to part ofthe desired object with one of the followingroutines:.I st_psym_isym,.I st_str_iss,and.I st_paux_iaux..NTThese routines only return objects within the current file. The followingroutines allow for file specification:.I st_psym_ifd_isym,.I st_aux_ifd_iaux,and.I st_str_ifd_iss..NEThe.I st_ppd_ifd_isym allows access to procedures throughthe file index for the file where they occurand the isym field of the entry that points at the local symbol forthat procedure. .PPThe return index from st_symadd should be used to get a dense number(see stcu).  That number should be the ucode block number for the object thesymbol describes..SH See Alsostcu(3), stfe(3), sym.h(5), stsupport.h(5)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?