📄 unldlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/unldLib.html - generated by refgen from unldLib.c --> <title> unldLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>unldLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>unldLib</strong> - object module unloading library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./unldLib.html#unld">unld</a></i>( )</b> - unload an object module by specifying a file name or module ID<br><b><i><a href="./unldLib.html#unldByModuleId">unldByModuleId</a></i>( )</b> - unload an object module by specifying a module ID<br><b><i><a href="./unldLib.html#unldByNameAndPath">unldByNameAndPath</a></i>( )</b> - unload an object module by specifying a name and path<br><b><i><a href="./unldLib.html#unldByGroup">unldByGroup</a></i>( )</b> - unload an object module by specifying a group number<br><b><i><a href="./unldLib.html#reld">reld</a></i>( )</b> - reload an object module<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides a facility for unloading object modules. Once anobject module has been loaded into the system (using the facilitiesprovided by <b><a href="./loadLib.html#top">loadLib</a></b>), it can be removed from the system by calling oneof the <b><i>unld...</i>( )</b> routines in this library.<p>Unloading of an object module does the following:<dl><dt>(1)<dd>It frees the space allocated for text, data,and BSS segments, unless <b><i><a href="./loadLib.html#loadModuleAt">loadModuleAt</a></i>( )</b> was called with specificaddresses, in which case the user is responsible for freeing the space.<p><dt>(2)<dd>It removes all symbols associated with the object module from thesystem symbol table.<p><dt>(3)<dd>It removes the module descriptor from the module list. </dl><p>Once the module is unloaded, any calls to routines in that module fromother modules will fail unpredictably. The user is responsible forensuring that no modules are unloaded that are used by other modules.<b><i><a href="./unldLib.html#unld">unld</a></i>( )</b> checks the hooks created by the following routines toensure none of the unloaded code is in use by a hook:<p> <b><i><a href="./taskHookLib.html#taskCreateHookAdd">taskCreateHookAdd</a></i>( )</b><br> <b><i><a href="./taskHookLib.html#taskDeleteHookAdd">taskDeleteHookAdd</a></i>( )</b><br> <b><i>taskHookAdd</i>( )</b><br> <b><i>taskSwapHookAdd</i>( )</b><br> <b><i><a href="./taskHookLib.html#taskSwitchHookAdd">taskSwitchHookAdd</a></i>( )</b><p>However, <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b> <i>does not</i> check the hooks created by these routines:<p> <b><i><a href="./etherLib.html#etherInputHookAdd">etherInputHookAdd</a></i>( )</b><br> <b><i><a href="./etherLib.html#etherOutputHookAdd">etherOutputHookAdd</a></i>( )</b><br> <b><i><a href="./excLib.html#excHookAdd">excHookAdd</a></i>( )</b><br> <b><i><a href="./rebootLib.html#rebootHookAdd">rebootHookAdd</a></i>( )</b><br> <b><i><a href="./moduleLib.html#moduleCreateHookAdd">moduleCreateHookAdd</a></i>( )</b><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>unldLib.h</b>, <b>moduleLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./unldLib.html#top">unldLib</a></b>, <b><a href="./loadLib.html#top">loadLib</a></b>, <b><a href="./moduleLib.html#top">moduleLib</a></b>, <i>Tornado User's Guide: Cross-Development</i><hr><a name="unld"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>unld</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>unld</i>( )</strong> - unload an object module by specifying a file name or module ID</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS unld ( void * nameOrId, /* name or ID of the object module file */ int options )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine unloads the specified object module from the system. Themodule can be specified by name or by module ID. For a.out and ECOFFformat modules, unloading does the following:<dl><dt>(1)<dd>It frees the space allocated for text, data,and BSS segments, unless <b><i><a href="./loadLib.html#loadModuleAt">loadModuleAt</a></i>( )</b> was called with specificaddresses, in which case the user is responsible for freeing the space.<p><dt>(2)<dd>It removes all symbols associated with the object module from thesystem symbol table.<p><dt>(3)<dd> It removes the module descriptor from the module list. </dl><p>For other modules of other formats, unloading has similar effects.<p>Before any modules are unloaded, all breakpoints in the system are deleted.If you need to keep breakpoints, set the options parameter to<b>UNLD_KEEP_BREAKPOINTS</b>. No breakpoints can be set in code that is unloaded.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./unldLib.html#top">unldLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell, </i>windsh, <i>Tornado User's Guide: Shell</i><hr><a name="unldByModuleId"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>unldByModuleId</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>unldByModuleId</i>( )</strong> - unload an object module by specifying a module ID</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS unldByModuleId ( MODULE_ID moduleId, /* module ID to unload */ int options )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine unloads an object module that has a module IDmatching <i>moduleId</i>.<p>See the manual entries for <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b> or <b><a href="./unldLib.html#top">unldLib</a></b> for more information onmodule unloading.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./unldLib.html#top">unldLib</a></b>, <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b><hr><a name="unldByNameAndPath"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>unldByNameAndPath</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>unldByNameAndPath</i>( )</strong> - unload an object module by specifying a name and path</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS unldByNameAndPath ( char * name, /* name of the object module to unload */ char * path, /* path to the object module to unload */ int options /* options, currently unused */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine unloads an object module specified by <i>name</i> and <i>path</i>.<p>See the manual entries for <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b> or <b><a href="./unldLib.html#top">unldLib</a></b> for more information onmodule unloading.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./unldLib.html#top">unldLib</a></b>, <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b><hr><a name="unldByGroup"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>unldByGroup</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>unldByGroup</i>( )</strong> - unload an object module by specifying a group number</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS unldByGroup ( UINT16 group, /* group number to unload */ int options /* options, currently unused */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine unloads an object module that has a group numbermatching <i>group</i>.<p>See the manual entries for <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b> or <b><a href="./unldLib.html#top">unldLib</a></b> for more information onmodule unloading.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./unldLib.html#top">unldLib</a></b>, <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b><hr><a name="reld"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>reld</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>reld</i>( )</strong> - reload an object module</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>MODULE_ID reld ( void * nameOrId, /* name or ID of the object module file */ int options /* options, currently unused */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine unloads a specified object module from the system, andthen calls <b><i><a href="./usrLib.html#ld">ld</a></i>( )</b> to load a new copy of the same name.<p>If the file was originally loaded using a complete pathname, then<b><i><a href="./unldLib.html#reld">reld</a></i>( )</b> will use the complete name to locate the file. Ifthe file was originally loaded using a partial pathname, then the current working directory must be changed to the workingdirectory in use at the time of the original load.<p></blockquote><h4>RETURNS</h4><blockquote><p>A module ID (type <b>MODULE_ID</b>), or NULL.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./unldLib.html#top">unldLib</a></b>, <b><i><a href="./unldLib.html#unld">unld</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -