📄 loadlib.html
字号:
</blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS loadCommonManage ( int comAreaSize, /* size of area required for common sym */ char * symName, /* symbol name */ SYMTAB_ID symTbl, /* target symbol table */ SYM_ADRS * pSymAddr, /* where to return symbol's address */ SYM_TYPE * pSymType, /* where to return symbol's type */ int loadFlag, /* control of loader's behavior */ SEG_INFO * pSeg, /* section addresses and sizes */ int group /* module group */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine processes the common symbols found in the object module.Common symbols are symbols declared global without being assigned avalue. Good programming avoids such declarations since it is almostimpossible to be sure what initialized global symbol should be used tosolve a common symbol relocation. The processing of common symbolsdepends on the following control flags, which enforce one of three levelsof strictness for common symbol evaluation:<dl><dt><b>LOAD_COMMON_MATCH_NONE</b><dd>This is the default option. Common symbols are kept isolated, visible fromthe object module only. This option prevents any matching withalready-existing symbols (in other words, the relocations that refer tothese symbols are kept local). Memory is allocated and symbols are addedto the symbol table with type <b>SYM_COMM</b> unless <b>LOAD_NO_SYMBOLS</b> is set.<p><dt><b>LOAD_COMMON_MATCH_USER</b><dd>The loader seeks a matching symbol in the target symbol table, but onlysymbols brought by user's modules are considered. If no matching symbolexists, it acts like <b>LOAD_COMMON_MATCH_NONE</b>. If several matching symbolsexist, the order of preference is: symbols in the bss segment, thensymbols in the data segment, then symbols in the text segment. If severalmatching symbols exist within a segment type, the symbol most recentlyadded to the target symbol table is used as reference.<p><dt><b>LOAD_COMMON_MATCH_ALL</b><dd> The loader seeks for a matching symbol in the target symbol table. Allsymbols are considered. If no matching symbol exists, then it acts like<b>LOAD_COMMON_MATCH_NONE</b>. If several matches are found, the order is thesame as for <b>LOAD_COMMON_MATCH_USER</b>.<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p>* OK or ERROR if the memory allocation or the addition to the symbol tablefails.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b>, <i>API Programmer's Guide: Object Module Loader </i><p><hr><a name="loadCoreFileCheck"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines : Routines</i></a></p></blockquote><h1><i>loadCoreFileCheck</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>loadCoreFileCheck</i>( )</strong> - check whether the core file is up to date</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS loadCoreFileCheck ( REMPTR pRemote, /* core file base address (target) */ void * pLocal, /* core file base address (host) */ UINT32 nBytes /* core file size */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine checks whether the core file used by the target server tobuild the target symbol table is as current as the core file loaded andrunning on the target. Checksum operations are done on the text segmentsin the cache maintained by the target server memory manager and in thetarget memory.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the text segments differ.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b>, <b><i>tgtChecksum</i>( )</b>, <b><i>checksum</i>( )</b>, <i>API Programmer's Guide: Object Module Loader </i><hr><a name="loadCoreBuilderSet"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines : Routines</i></a></p></blockquote><h1><i>loadCoreBuilderSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>loadCoreBuilderSet</i>( )</strong> - record information about the tool chain</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void loadCoreBuilderSet ( char * builder /* compilation tool chain reference */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine records the compilation-tool-chain references (the "builder")for further use. A "builder" is a string used by the make technology ofthe target server. Builders are defined to produce a.out, COFF, or ELF.If no information exists, the builder is set to <b>unknown</b>.<p>Call this routine only once, when the core file is loaded.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b>, <b><i><a href="./loadlib.html#loadCoreBuilderGet">loadCoreBuilderGet</a></i>( )</b>, <i>API Programmer's Guide: Object Module Loader </i><p><hr><a name="loadCoreBuilderGet"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines : Routines</i></a></p></blockquote><h1><i>loadCoreBuilderGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>loadCoreBuilderGet</i>( )</strong> - publish information about the tool chain</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * loadCoreBuilderGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the compilation-tool-chain and object-module-formatreferences, the "builder." A "builder" is a string used by the maketechnology of the target server. Builders are defined to producea.out, COFF, or ELF. If no information exists, the builder is set to<b>unknown</b>.<p>Call this routine only after <b><i><a href="./loadlib.html#loadCoreBuilderSet">loadCoreBuilderSet</a></i>( )</b> has recordedthe reference.<p></blockquote><h4>RETURNS</h4><blockquote><p>The "builder" string.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b>, <b><i><a href="./loadlib.html#loadCoreBuilderSet">loadCoreBuilderSet</a></i>( )</b>, <i>API Programmer's Guide: Object Module Loader </i><p><hr><a name="loadFlagsCheck"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines : Routines</i></a></p></blockquote><h1><i>loadFlagsCheck</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>loadFlagsCheck</i>( )</strong> - check for illegal combinations of flags</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS loadFlagsCheck ( int loadFlags, /* control of loader's behavior */ void * * ppText, /* adrs where to store the text seg address */ void * * ppData, /* adrs where to store the data seg address */ void * * ppBss /* adrs where to store the bss seg address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine checks whether or not the flags applied for the load sessionform a valid combination.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the combination is illegal.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b><hr><a name="loadOutputToFile"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines : Routines</i></a></p></blockquote><h1><i>loadOutputToFile</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>loadOutputToFile</i>( )</strong> - write a module's segments in a file</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS loadOutputToFile ( char * fileName, /* object file name */ SEG_INFO * pSeg /* information about segments */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes the contents of a specified module's text and datasegments in a file for testing purposes. The output-file name is createdfrom the object-file name with <b>.rms</b> as extension (<b>rms</b> stands for<i>Relocated Module Segments</i>). Any existing file with the same name isoverwritten.<p>Segment contents are written contiguously in the file.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the file can't be opened or written.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b>, <i>API Programmer's Guide: Object Module Loader </i><hr><a name="loadRelocLink"></a><p align=right><a href="rtnIndex.html"><i>Target Server Internal Routines : Routines</i></a></p></blockquote><h1><i>loadRelocLink</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>loadRelocLink</i>( )</strong> - Link the relocator Shared library to the OMF specific loader.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS loadRelocLink ( DYNLK_FUNC relocDllFv[], /* array of function descriptions */ int routineNb /* # of routines to link */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine load the relocator DLL, and link all the routines given in thearguments.It is called by the specific loader initialization routine.The loader gives the names of the functions it expects to find in the relocator library ( in the relocDllFv array), and the max number of functionit expects to find.Note that we expect to find at least two (2) functions in the Library.This facility is given because optionnal functions (like init routine) can befound in the library, but are not mandatory.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./loadlib.html#top">loadlib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -