⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c-loader5.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</font><dl class="margin"><dd><p class="Body"><a name="84825"> </a>The loader defines a set of symbol types (<b class="symbol_UC">SYM_TYPE</b>) in<b class="file"> symbol.h</b> in order to handle the symbols more easily. The loader uses the types to classify the module symbols. The symbol types defined by the loader are:</p></dl><dl class="margin"><dd><div class="Item"><a name="84827"> </a><b class="symbol_UC">SYM_UNDEF</b> </div><dl class="margin"><dd><div class="Indent"><a name="84828"> </a>The symbol is not defined in the module.</div><br></dl><dd><div class="Item"><a name="84830"> </a><b class="symbol_UC">SYM_LOCAL</b> </div><dl class="margin"><dd><div class="Indent"><a name="84831"> </a>The scope of the symbol is limited to the module.</div><br></dl><dd><div class="Item"><a name="84833"> </a><b class="symbol_UC">SYM_GLOBAL</b> </div><dl class="margin"><dd><div class="Indent"><a name="84834"> </a>The symbol is accessible to anyone.</div><br></dl><dd><div class="Item"><a name="84836"> </a><b class="symbol_UC">SYM_ABS</b> </div><dl class="margin"><dd><div class="Indent"><a name="84837"> </a>The symbol has an absolute value that must be kept as it is.</div><br></dl><dd><div class="Item"><a name="84839"> </a><b class="symbol_UC">SYM_TEXT</b> </div><dl class="margin"><dd><div class="Indent"><a name="84840"> </a>The symbol belongs to the text segment.</div><br></dl><dd><div class="Item"><a name="84842"> </a><b class="symbol_UC">SYM_DATA</b> </div><dl class="margin"><dd><div class="Indent"><a name="84843"> </a>The symbol belongs to the data segment.</div><br></dl><dd><div class="Item"><a name="84845"> </a><b class="symbol_UC">SYM_BSS</b> </div><dl class="margin"><dd><div class="Indent"><a name="84846"> </a>The symbol belongs to the <i class="term">bss </i>segment.</div><br></dl><dd><div class="Item"><a name="84848"> </a><b class="symbol_UC">SYM_COMM</b> </div><dl class="margin"><dd><div class="Indent"><a name="84850"> </a>The symbol is a common symbol.</div><br></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84852">3.5.4  &nbsp;&nbsp;Loader Options</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84854"> </a>The loader behavior may be tuned by using options. Many of these options may be combined, although some are mutually exclusive. The option names given below are the names used internally by the loader. They are defined in <b class="library">loadlib.h</b>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84855">Symbol Scope</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84860"> </a>As explained in <a href="c-loader5.html#84764"><i class="title">3.5.3&nbsp;Symbol Management</i></a>, any defined symbol may be added to the target server symbol table. Several options allow the user to specify exactly which symbols should be added to the table:</p></dl><dl class="margin"><dd><div class="Item"><a name="84862"> </a><b class="symbol_UC">LOAD_LOCAL_SYMBOLS</b> </div><dl class="margin"><dd><div class="Indent"><a name="84863"> </a>Add only local symbols to the target server symbol table. Note that this may include some debugging symbols, depending on the OMF.</div><br></dl><dd><div class="Item"><a name="84865"> </a><b class="symbol_UC">LOAD_GLOBAL_SYMBOLS</b> </div><dl class="margin"><dd><div class="Indent"><a name="84866"> </a>Add only global symbols to the target server symbol table (the default).</div><br></dl><dd><div class="Item"><a name="84868"> </a><b class="symbol_UC">LOAD_ALL_SYMBOLS</b> </div><dl class="margin"><dd><div class="Indent"><a name="84869"> </a>Add both local and global symbols to the target server symbol table.</div><br></dl><dd><div class="Item"><a name="84871"> </a><b class="symbol_UC">LOAD_NO_SYMBOLS</b> </div><dl class="margin"><dd><div class="Indent"><a name="84872"> </a>Add no symbols to the target server symbol table. (This option is mutually exclusive with others.) With this option, there is no way to know the contents of the module.</div><br></dl></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/warning.gif"></td><td><hr><div class="CalloutCell"><a name="88603"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING:  </font></b></a>These options affect not only the visibility of the symbols but also the load operations that occur after the module is loaded. For instance, if you load a module with the <b class="symbol_UC">LOAD_NO_SYMBOLS</b> flag set, none of its global symbols is added to the target server symbol table. Not only are they hidden from the other modules, but they are also unreachable; no reference is possible to these symbols. If you load another object module that refers to a symbol (for example, a routine) in the previous module, the loader cannot find the reference and the symbol is considered unknown. It is also impossible to call a routine within such a module symbolically from the shell. The only way to call the routine is by using its address.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84883">Module Visibility</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84885"> </a>When a module is loaded, the target server normally records it. Any tool can request and receive information related to the module. This default behavior can be changed by using the following option:</p></dl><dl class="margin"><dd><div class="Item"><a name="84887"> </a><b class="symbol_UC">LOAD_HIDDEN_MODULE</b> </div><dl class="margin"><dd><div class="Indent"><a name="84888"> </a>Do not keep the module information. Note that this option does not hide the module symbols. To do so, it must be combined with <b class="symbol_UC">LOAD_NO_SYMBOLS</b>.</div><br></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84890">Module Type</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84892"> </a>The loader default considers all files relocatable object-modules requiring a relocation stage (see <a href="c-loader5.html#84654"><i class="title">3.5.1&nbsp;Object-Module Configuration in Target Memory</i></a>). To load files that do not require a relocation stage, the loader must be told that the file type is fully linked. Two options are available for fully linked files:</p></dl><dl class="margin"><dd><div class="Item"><a name="84897"> </a><b class="symbol_UC">LOAD_FULLY_LINKED</b> </div><dl class="margin"><dd><div class="Indent"><a name="84898"> </a>Required for any fully linked file. When it is used, no relocation is done.</div><br></dl><dd><div class="Item"><a name="84900"> </a><b class="symbol_UC">LOAD_NO_DOWNLOAD</b> </div><dl class="margin"><dd><div class="Indent"><a name="84901"> </a>This option suppresses downloading the file to target memory. The relocation is done in the target server cache only.</div><br></dl><dd><div class="Item"><a name="84902"> </a><b class="symbol_UC">LOAD_CORE_FILE</b> </div><dl class="margin"><dd><div class="Indent"><a name="84903"> </a>It is used exclusively at connection time to load the core file. This is a combination of <b class="symbol_UC">LOAD_NO_DOWNLOAD</b> and <b class="symbol_UC">LOAD_FULLY_LINKED</b>.</div><br></dl></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/caution.gif"></td><td><hr><div class="CalloutCell"><a name="88619"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">CAUTION:  </font></b></a>The loader does not allocate memory on the target system when a fully-linked file is loaded as it does for relocatable files. The file segments are located at the addresses described in the file header; this depends on the OMF.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84915">Common Symbols</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84917"> </a>Three mutually exclusive options provide the ability to specify how the loader handles common symbols. They are listed in order of decreasing strictness:</p></dl><dl class="margin"><dd><div class="Item"><a name="84919"> </a><b class="symbol_UC">LOAD_COMMON_MATCH_NONE</b> <b class="symbol_UC"></b></div><dl class="margin"><dd><div class="Indent"><a name="84920"> </a>Keep common symbols isolated, visible from the object module only. This option prevents any matching with already-existing symbols (in other words, the relocations that refer to these symbols are kept local). Common symbols are added to the symbol table unless <b class="symbol_UC">LOAD_NO_SYMBOLS</b> is set. This is the default option. </div><br></dl><dd><div class="Item"><a name="84922"> </a><b class="symbol_UC">LOAD_COMMON_MATCH_USER</b> </div><dl class="margin"><dd><div class="Indent"><a name="84923"> </a>Seek a matching symbol in the target server symbol table, but consider only symbols in user modules. If no matching symbol exists, act like <b class="symbol_UC">LOAD_COMMON_MATCH_NONE</b>.</div><br></dl><dd><div class="Item"><a name="84925"> </a><b class="symbol_UC">LOAD_COMMON_MATCH_ALL</b> </div><dl class="margin"><dd><div class="Indent"><a name="84926"> </a>Seek a matching symbol in the target server symbol table, but consider all symbols. If no matching symbol exists, act like <b class="symbol_UC">LOAD_COMMON_MATCH_NONE</b>.</div><br></dl></dl><dl class="margin"><dd><p class="Body"><a name="84927"> </a>If several matching symbols exist for options <b class="symbol_UC">LOAD_COMMON_MATCH_USER</b> and <b class="symbol_UC">LOAD_COMMON_MATCH_ALL</b>, the order of precedence is: symbols in the <i class="term">bss </i>segment, then symbols in the data segment, then symbols in the text segment. If several matching symbols exist within a single segment type, the symbol most recently added to the target server symbol table is used.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84928">Special Options</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84929"> </a>The loader accepts special options, with scope limited to specific cases:</p></dl><dl class="margin"><dd><div class="Item"><a name="84931"> </a><b class="symbol_UC">LOAD_BAL_OPTIM</b> (i960 targets only) </div><dl class="margin"><dd><div class="Indent"><a name="84932"> </a>Replace the i960 <b class="symbol_UC">CALL</b> opcode with the <b class="symbol_UC">BAL </b>opcode. This makes the loader slower, and is not a default option.</div><br></dl><dd><div class="Item"><a name="84934"> </a><b class="symbol_UC">LOAD_FILE_OUTPUT</b> </div><dl class="margin"><dd><div class="Indent"><a name="84935"> </a>Dump the module text and data segments to a file instead of to target memory. This option is used only for testing. <b class="symbol_UC">LOAD_FILE_OUTPUT</b> is mutually exclusive with <b class="symbol_UC">LOAD_FULLY_LINKED</b>.</div><br></dl></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-loader.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-loader.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-loader4.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-loader6.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

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