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

📄 vxwmodule.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/VXWModule.html - generated by refgen from /vobs/wpwr/docs/vxworks/ref/VXWModule.i --> <title> VXWModule </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Wind Foundation Classes</i></a></p></blockquote><h1>VXWModule</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>VXWModule</strong> - object module class</p></blockquote><h4>METHODS</h4><blockquote><p><p><b><i><a href="./VXWModule.html#VXWModule::VXWModule">VXWModule::VXWModule</a></i>(&nbsp;)</b>  -  build module object from module ID<br><b><i><a href="./VXWModule.html#VXWModule::VXWModule_1">VXWModule::VXWModule</a></i>(&nbsp;)</b>  -  load an object module at specified memory addresses<br><b><i><a href="./VXWModule.html#VXWModule::VXWModule_2">VXWModule::VXWModule</a></i>(&nbsp;)</b>  -  load an object module into memory<br><b><i><a href="./VXWModule.html#VXWModule::VXWModule_3">VXWModule::VXWModule</a></i>(&nbsp;)</b>  -  create and initialize an object module<br><b><i><a href="./VXWModule.html#VXWModule::~VXWModule">VXWModule::~VXWModule</a></i>(&nbsp;)</b>  -  unload an object module<br><b><i><a href="./VXWModule.html#VXWModule::flags">VXWModule::flags</a></i>(&nbsp;)</b>  -  get the flags associated with this module<br><b><i><a href="./VXWModule.html#VXWModule::info">VXWModule::info</a></i>(&nbsp;)</b>  -  get information about object module<br><b><i><a href="./VXWModule.html#VXWModule::name">VXWModule::name</a></i>(&nbsp;)</b>  -  get the name associated with module<br><b><i><a href="./VXWModule.html#VXWModule::segFirst">VXWModule::segFirst</a></i>(&nbsp;)</b>  -  find the first segment in module<br><b><i><a href="./VXWModule.html#VXWModule::segGet">VXWModule::segGet</a></i>(&nbsp;)</b>  -  get (delete and return) the first segment from module<br><b><i><a href="./VXWModule.html#VXWModule::segNext">VXWModule::segNext</a></i>(&nbsp;)</b>  -  find the next segment in module<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>The <b><a href="./VXWModule.html#top">VXWModule</a></b> class provides a generic object-module loadingfacility.  Any object files in a supported format may be loadedinto memory, relocated properly, their external referencesresolved, and their external definitions added to the system symboltable for use by other modules.  Modules may be loaded from any I/Ostream.<p></blockquote><h4>INCLUDE FILE</h4><blockquote><p><b>vxwLoadLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWModule.html#top">VXWModule</a></b>, <b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./symLib.html#top">symLib</a></b>, VXWMemPart,  <i>VxWorks Programmer's Guide: C++ Development</i><p><p><hr><a name="VXWModule::VXWModule"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWModule::VXWModule</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWModule::VXWModule</i>(&nbsp;)</strong> - build module object from module ID</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>VXWModule    (    MODULE_ID aModuleId    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Use this constructor to manipulate a module that was not loadedusing C++ interfaces.  The argument <i>id</i> is the moduleidentifier returned and used by the C interface to the VxWorkstarget-resident load facility.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWModule.html#top">VXWModule</a></b>, <b><a href="./loadLib.html#top">loadLib</a></b><hr><a name="VXWModule::VXWModule_1"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWModule::VXWModule</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWModule::VXWModule</i>(&nbsp;)</strong> - load an object module at specified memory addresses</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>VXWModule    (    int    fd,    int    symFlag,    char * *ppText,    char * *ppData=0,    char * *ppBss=0    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This constructor reads an object module from <i>fd</i>, and loads thecode, data, and BSS segments at the specified load addresses inmemory set aside by the caller using <b><i><a href="./VXWMemPart.html#VXWMemPart::alloc">VXWMemPart::alloc</a></i>(&nbsp;)</b>, or in thesystem memory partition as described below.  The module is properlyrelocated according to the relocation commands in the file.Unresolved externals will be linked to symbols found in the systemsymbol table.  Symbols in the module being loaded can optionally beadded to the system symbol table.<p></blockquote><h4>LINKING UNRESOLVED EXTERNALS</h4><blockquote><p>As the module is loaded, any unresolved external references are resolvedby looking up the missing symbols in the the system symbol table.If found, those references are correctly linked to the new module.If unresolved external references cannot be found in the system symboltable, then an error message ("undefined symbol: ...") is printed forthe symbol, but the loading/linking continues.  In this case, NULL isreturned after the module is loaded.<p></blockquote><h4>ADDING SYMBOLS TO THE SYMBOL TABLE</h4><blockquote><p>The symbols defined in the module to be loaded may be optionally addedto the target-resident system symbol table, depending on the value of<i>symFlag</i>:<dl><dt><b>LOAD_NO_SYMBOLS</b><dd>add no symbols to the system symbol table<p><dt><b>LOAD_LOCAL_SYMBOLS</b><dd>add only local symbols to the system symbol table<p><dt><b>LOAD_GLOBAL_SYMBOLS</b><dd>add only external symbols to the system symbol table<p><dt><b>LOAD_ALL_SYMBOLS</b><dd>add both local and external symbols to the system symbol table<p><dt><b>HIDDEN_MODULE</b><dd> do not display the module via <b><i><a href="./moduleLib.html#moduleShow">moduleShow</a></i>(&nbsp;)</b>. </dl><p>In addition, the following symbols are also added to the symbol tableto indicate the start of each segment:<i>filename</i>_text, <i>filename</i>_data, and <i>filename</i>_bss,where <i>filename</i> is the name associated with the fd.<p></blockquote><h4>RELOCATION</h4><blockquote><p>The relocation commands in the object module are used to relocatethe text, data, and BSS segments of the module.  The location of eachsegment can be specified explicitly, or left unspecified in whichcase memory is allocated for the segment from the system memorypartition.  This is determined by the parameters <i>ppText</i>, <i>ppData</i>, and<i>ppBss</i>, each of which can have the following values:<dl><dt>NULL<dd>no load address is specified, none will be returned;<p><dt>A pointer to <b>LD_NO_ADDRESS</b><dd>no load address is specified, the return address is referenced by thepointer;<p><dt>A pointer to an address<dd> the load address is specified. </dl><p>The <i>ppText</i>, <i>ppData</i>, and <i>ppBss</i> parameters specify where to loadthe text, data, and bss sections respectively.  Each of theseparameters is a pointer to a  pointer; for example, **<i>ppText</i>gives the address where the text segment is to begin.<p>For any of the three parameters, there are two ways to request thatnew memory be allocated, rather than specifying the section'sstarting address: you can either specify the parameter itself asNULL, or you can write the constant <b>LD_NO_ADDRESS</b> in place of anaddress.  In the second case, this constructor replaces the<b>LD_NO_ADDRESS</b> value with the address actually used for each section(that is, it records the address at *<i>ppText</i>, *<i>ppData</i>, or*<i>ppBss</i>).<p>The double indirection not only permits reporting the addressesactually used, but also allows you to specify loading a segmentat the beginning of memory, since the following cases can bedistinguished:<dl><dt>(1)<dd>Allocate memory for a section (text in this example):  <i>ppText</i> == NULL<p><dt>(2)<dd> Begin a section at address zero (the text section, below):  *<i>ppText</i> == 0 </dl><p>Note that <b><i><a href="./loadLib.html#loadModule">loadModule</a></i>(&nbsp;)</b> is equivalent to this routine if all three of thesegment-address parameters are set to NULL.<p></blockquote><h4>COMMON</h4><blockquote><p>Some host compiler/linker combinations internally use anotherstorage class known as <i>common</i>.  In the C language,uninitialized global variables are eventually put in the BSSsegment.  However, in partially linked object modules they areflagged internally as common and the static linker on the hostresolves these and places them in BSS as a final step in creating afully linked object module.  However, the VxWorks target-residentdynamic loader is most often used to load partially linked objectmodules.  When the VxWorks loader encounters a variable labeled ascommon, memory for the variable is allocated, and the variable isentered in the system symbol table (if specified) at that address.Note that most static loaders have an option that forces resolutionof the common storage while leaving the module relocatable.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWModule.html#top">VXWModule</a></b>, <i>VxWorks Programmer's Guide: C++ Development</i>

⌨️ 快捷键说明

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