亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unldlib.c

?? vxworks的完整的源代碼
?? C
字號:
/* unldLib.c - object module unloading library *//* Copyright 1992-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01r,15may02,jn   improve explanation of shell commands01q,18mar02,jn   remove dependence on usrLib (call to ld)01p,30oct96,elp  Added syncUnldRtn function pointer (symtbls synchro).01o,09aug96,dbt  check segment size in macro IN_TEXT_SEGMENT (SPR #3908).		 Updated copyright.01n,10oct95,jdi  doc: added .tG Shell to unld(); changed .pG Cross-Dev to .tG.01m,11feb95,jdi  doc format repair.01l,02nov93,caf  made unldTextInUse() static, like its prototype.01l,20may94,dvs  fixed references to unallocated memory in reld() (SPR 3005)01k,25aug93,srh  added call to C++ run-time for static dtors (spr 2341)01j,22aug93,jmm  added call to bdall() from unld{ByModuleId} ()01i,18aug93,jmm  removed checking of ether hook routines for unld01h,13aug93,jmm  added code to test hook routines before unld() (spr 2054)01g,25nov92,jdi  documentation cleanup.01f,30oct92,jmm  fixed adding "/" separator in reld() (spr 1717)01e,16sep92,kdl  added "/" separator when combining path & name in reld().01d,02sep92,jmm  changed name of symFlags field in reld()01c,29jul92,jmm  cleaned up warning messages01b,21jul92,rdc  mods to support text segment write protection.01a,26may92,jmm  written*//*DESCRIPTIONThis library provides a facility for unloading object modules.  Once anobject module has been loaded into the system (using the facilitiesprovided by loadLib), it can be removed from the system by calling oneof the unld...() routines in this library.Unloading of an object module does the following:.IP (1) 4It frees the space allocated for text, data,and BSS segments, unless loadModuleAt() was called with specificaddresses, in which case the user is responsible for freeing the space..IP (2)It removes all symbols associated with the object module from thesystem symbol table..IP (3)It removes the module descriptor from the module list..LPOnce 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.unld() checks the hooks created by the following routines toensure none of the unloaded code is in use by a hook:    taskCreateHookAdd()    taskDeleteHookAdd()    taskHookAdd()    taskSwapHookAdd()    taskSwitchHookAdd()However, unld() \f2does not\fP check the hooks created by these routines:    etherInputHookAdd()    etherOutputHookAdd()    excHookAdd()    rebootHookAdd()    moduleCreateHookAdd()The routines unld() and reld() are 'shell commands'.  That is,they are designed to be used only in the shell, and not in coderunning on the target.  In future releases, calling unld() and reld() directly from code may not be supported.INCLUDE FILES: unldLib.h, moduleLib.hSEE ALSO: loadLib, moduleLib,.tG "Cross-Development" *//* LINTLIBRARY */#include "vxWorks.h"#include "a_out.h"#include "errno.h"#include "ioLib.h"#include "loadLib.h"#include "moduleLib.h"#include "stdio.h"#include "stdlib.h"#include "symLib.h"#include "symbol.h"#include "sysSymTbl.h"#include "unldLib.h"#include "private/vmLibP.h"#include "string.h"#include "usrLib.h"#include "etherLib.h"#include "private/cplusLibP.h"#include "private/taskLibP.h"#include "private/funcBindP.h"#define IN_TEXT_SEGMENT(adrs, segment) (((void *) (adrs) >= (segment)->address) && \					(((void *) (adrs) <= (void *) (((int) (segment)->address) + (segment)->size))) && \					(segment->size != 0))/* globals */FUNCPTR	syncUnldRtn = (FUNCPTR)NULL;/* locals *//* forward static functions */ static BOOL unldSymbols (char *name, int val, SYM_TYPE type, int deleteGroup,			 UINT16 group, SYMBOL *pSymbol);static STATUS unldTextInUse (MODULE_ID moduleId); /******************************************************************************** unld - unload an object module by specifying a file name or module ID* * This routine unloads the specified object module from the system.  The* module can be specified by name or by module ID.  For a.out and ECOFF* format modules, unloading does the following:* .IP (1) 4* It frees the space allocated for text, data,* and BSS segments, unless loadModuleAt() was called with specific* addresses, in which case the user is responsible for freeing the space.* .IP (2)* It removes all symbols associated with the object module from the* system symbol table.* .IP (3)* It removes the module descriptor from the module list.* .LP** For other modules of other formats, unloading has similar effects.** Before any modules are unloaded, all breakpoints in the system are deleted.* If you need to keep breakpoints, set the options parameter to* UNLD_KEEP_BREAKPOINTS.  No breakpoints can be set in code that is unloaded.* * This routine is a 'shell command'.  That is, it is designed to be* used only in the shell, and not in code running on the target.  In* future releases, calling unld() directly from code may not be* supported.** RETURNS: OK or ERROR.** SEE ALSO:* .pG "Target Shell,"* windsh,* .tG "Shell" */STATUS unld    (    void *	nameOrId,	/* name or ID of the object module file */    int 	options		    )    {    MODULE_ID 	moduleId;    /* Given the name, find the right module id, then call unldByModuleId(). */    if (((moduleId = moduleIdFigure (nameOrId))) != NULL)        return (unldByModuleId (moduleId, options));    else        return (ERROR);    }/******************************************************************************** unldByModuleId - unload an object module by specifying a module ID** This routine unloads an object module that has a module ID* matching <moduleId>.** See the manual entries for unld() or unldLib for more information on* module unloading.* * RETURNS: OK or ERROR.* * SEE ALSO: unld()*/STATUS unldByModuleId    (    MODULE_ID 	moduleId,      	/* module ID to unload */    int       	options		    )    {    SEGMENT_ID 	segmentId;    int 	pageSize;    int 	segSize;    MODULE	syncBuf;    /* store unloaded module info to be able to synchronize host symtbl */    if (syncUnldRtn != NULL)	memcpy (&syncBuf, moduleId, sizeof (MODULE));    /* Make sure the text segment isn't in use */    if (unldTextInUse (moduleId) != OK)        return (ERROR);        /* Give C++ run-time a chance to call static destructors */    cplusUnloadFixup (moduleId);    /* If options isn't set to 1, delete all breakpoints in the system */    if (_func_bdall != NULL && !(options & UNLD_KEEP_BREAKPOINTS))        (*_func_bdall) (0);        /* Free all segments */    while ((segmentId = moduleSegGet (moduleId)))	{	/*	 * If the segment is marked to dynamically free space, do so	 */	if (segmentId->flags & SEG_FREE_MEMORY)	    {	    /* make sure it's not write protected */	    if (segmentId->flags & SEG_WRITE_PROTECTION)		{		pageSize = VM_PAGE_SIZE_GET ();		/* round seg size to intergral num pages */		segSize = segmentId->size / pageSize * pageSize + pageSize;		if (VM_STATE_SET (NULL, segmentId->address, segSize, 		    VM_STATE_MASK_WRITABLE, VM_STATE_WRITABLE) == ERROR)		    return (ERROR);		}	    free (segmentId->address);	    }	free (segmentId);	}    /*     * Remove all symbols from the symbol table that match the group     * ID #.  If they're common symbols, delete their storage space.     */    symEach (sysSymTbl, (FUNCPTR) unldSymbols, (int) moduleId->group);    /* Remove the module itself */    if (moduleDelete (moduleId) != OK)	{	return (ERROR);	}    if ((~options & UNLD_SYNC) && (syncUnldRtn != NULL))	(* syncUnldRtn) (&syncBuf);    return (OK);    }/******************************************************************************** unldByNameAndPath - unload an object module by specifying a name and path** This routine unloads an object module specified by <name> and <path>.** See the manual entries for unld() or unldLib for more information on* module unloading.* * RETURNS: OK or ERROR.* * SEE ALSO: unld()*/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 */    )    {    MODULE_ID moduleId;    /*     * Given the name and path, find the right module id, then call     * unldByModuleId().     */    if ((moduleId = moduleFindByNameAndPath (name, path)) != NULL)        return (unldByModuleId (moduleId, options));    else        return (ERROR);    }/******************************************************************************** unldByGroup - unload an object module by specifying a group number** This routine unloads an object module that has a group number* matching <group>.** See the manual entries for unld() or unldLib for more information on* module unloading.* * RETURNS: OK or ERROR.* * SEE ALSO: unld()*/STATUS unldByGroup    (    UINT16	group,		/* group number to unload */    int  	options		/* options, currently unused */    )    {    MODULE_ID 	moduleId;    /*     * Given the name, find the right module id, then call unldByModuleId().     */    if ((moduleId = moduleFindByGroup (group)) != NULL)        return (unldByModuleId (moduleId, options));    else        return (ERROR);    }/******************************************************************************** unldSymbols - support routine for unldByModuleId** This routine is used by unldByModuleId() as an argument to symEach().* * NOMANUAL*/LOCAL BOOL unldSymbols    (    char *	 name,		/* not used */    int	   	 val,		/* not used */    SYM_TYPE 	 type,		/* not used */    int	 	 deleteGroup,	/* group number to delete */    UINT16       group,		/* group number of current symbol*/    SYMBOL *	 pSymbol	/* a pointer to the symbol itself */    )    {    if (group == deleteGroup)	{	if (symTblRemove (sysSymTbl, pSymbol) != OK)	    {	    printf ("got bad symbol, %#x\n", (UINT) pSymbol);	    return (FALSE);	    }	/*	 * if the type is N_COMM, then free the memory associated	 * with the symbol.	 */	if ((pSymbol->type & N_COMM) == N_COMM)	    {	    free (pSymbol->value);	    }	/* free the space allocated for the symbol itself */	symFree (sysSymTbl, pSymbol);        	}    return (TRUE);    }/******************************************************************************** reld - reload an object module** This routine unloads a specified object module from the system, and* then calls loadModule() to load a new copy of the same name.* * If the file was originally loaded using a complete pathname, then* reld() will use the complete name to locate the file.  If* the file was originally loaded using a partial pathname, then the * current working directory must be changed to the working* directory in use at the time of the original load.* * Valid values for the options parameter are the same as those allowed * for the function unld().  * * This routine is a 'shell command'.  That is, it is designed to be* used only in the shell, and not in code running on the target.  In* future releases, calling reld() directly from code may not be* supported.** RETURNS: A module ID (type MODULE_ID), or NULL.* * SEE ALSO: unld()*/MODULE_ID reld    (    void *	nameOrId,	/* name or ID of the object module file */    int 	options		/* options used for unloading           */    )    {    MODULE_ID 	moduleId;    MODULE_ID 	newModuleId;    char	fileName [NAME_MAX + PATH_MAX];    int         fd;    int		flags;        /*     * Given the name, find the right module id, then call unldByModuleId()     * and loadModule().     */    if (((moduleId = moduleIdFigure (nameOrId))) != NULL)	{	/* build the new file name before destroying module */	strcpy (fileName, moduleId->path);	if (moduleId->path [0] != EOS)	    strcat (fileName, "/");	strcat (fileName, moduleId->name);	flags = moduleId->flags;	        unldByModuleId (moduleId, options);	/* reload module */        fd = open (fileName, O_RDONLY, 0);        if (fd == ERROR)            return (NULL);	newModuleId = loadModule (fd, flags);        close (fd);	return (newModuleId);	}    else        return (NULL);    }/******************************************************************************** unldTextSegmentCheck - check that text segment is not in use by hook routine* * unldTextSegmentCheck returns TRUE if the segment is not a text segment,* or if the text segment is not used by any hook routines.* * RETURNS: TRUE, or FALSE if the text segment is in use by a hook routine.* * NOMANUAL*/BOOL unldTextSegmentCheck    (    SEGMENT_ID 	 segmentId,    MODULE_ID	 moduleId,     int		 unused    )    {    int          hookNumber;    /* If it's not a text segment, just return TRUE */        if (segmentId->type != SEGMENT_TEXT)        return (TRUE);    /* The exception hook is a simple variable */    if (IN_TEXT_SEGMENT (excExcepHook, segmentId))        return (FALSE);    /* check the various task hooks */    for (hookNumber = 0; hookNumber < VX_MAX_TASK_CREATE_RTNS; hookNumber++)        if (IN_TEXT_SEGMENT (taskCreateTable [hookNumber], segmentId))	    return (FALSE);    for (hookNumber = 0; hookNumber < VX_MAX_TASK_DELETE_RTNS; hookNumber++)        if (IN_TEXT_SEGMENT (taskDeleteTable [hookNumber], segmentId))	    return (FALSE);        for (hookNumber = 0; hookNumber < VX_MAX_TASK_SWAP_RTNS; hookNumber++)        if (IN_TEXT_SEGMENT (taskSwapTable [hookNumber], segmentId))	    return (FALSE);        for (hookNumber = 0; hookNumber < VX_MAX_TASK_SWITCH_RTNS; hookNumber++)        if (IN_TEXT_SEGMENT (taskSwitchTable [hookNumber], segmentId))	    return (FALSE);    /* Didn't find anything, return TRUE */    return (TRUE);    }    /******************************************************************************** unldTextInUse - check to see if text segment is used by a hook* * unldTextSegment checks the system hook routines to see if any of them* use text that is about to be unloaded.  Modules that have hooks using* their text cannot be unloaded.* * unldTextSegmentUsed checks the hooks created by the following routines:* * STATUS taskCreateHookAdd* STATUS taskDeleteHookAdd* LOCAL STATUS taskHookAdd* STATUS taskSwapHookAdd* STATUS taskSwitchHookAdd* * unldTextSegmentUsed DOES NOT check the hooks created by these routines:** STATUS etherInputHookAdd* etherOutputHookAdd* void excHookAdd* STATUS rebootHookAdd* STATUS moduleCreateHookAdd* * RETURNS:  OK, or ERROR if the text segment is in use.* * NOMANUAL*/static STATUS unldTextInUse    (    MODULE_ID 	moduleId      	/* module ID to check */    )    {    if (moduleSegEach (moduleId, unldTextSegmentCheck, 0) != NULL)	{	errno = S_unldLib_TEXT_IN_USE;        return (ERROR);	}    else        return (OK);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本免费电影| 国产精品白丝在线| 欧美在线999| 成人av在线网站| 国产成人免费网站| 黄网站免费久久| 国产一区二区三区香蕉| 国产在线麻豆精品观看| 久色婷婷小香蕉久久| 久久黄色级2电影| 麻豆freexxxx性91精品| 久久爱www久久做| 极品少妇xxxx精品少妇| 国产一区二区福利| 波多野结衣亚洲一区| 成人av影院在线| av动漫一区二区| 91久久精品网| 91精品国产欧美一区二区18| 欧美mv和日韩mv国产网站| 久久尤物电影视频在线观看| 国产欧美一二三区| 亚洲色图一区二区| 午夜视频在线观看一区| 久久精品国产亚洲一区二区三区| 久久99精品一区二区三区| 国产99久久久久久免费看农村| 99久久久精品免费观看国产蜜| 91黄视频在线| 欧美成人艳星乳罩| 国产精品久久久久aaaa| 亚洲成av人影院| 激情综合五月婷婷| 色综合天天天天做夜夜夜夜做| 色婷婷香蕉在线一区二区| 91精品国产综合久久香蕉麻豆| 久久久国产综合精品女国产盗摄| 一区二区三区中文字幕在线观看| 免费精品99久久国产综合精品| 成人精品国产免费网站| 欧美视频中文字幕| 久久久久9999亚洲精品| 亚洲电影中文字幕在线观看| 精品写真视频在线观看| 91丨porny丨户外露出| 宅男噜噜噜66一区二区66| 久久久久久久久久美女| 亚洲国产精品久久人人爱| 国产精品1024| 91精品国产高清一区二区三区 | 国产女同性恋一区二区| 亚洲影视在线观看| 国产精品99久久不卡二区| 精品视频一区三区九区| 中文字幕乱码亚洲精品一区| 视频一区视频二区在线观看| 成人在线视频一区| 日韩免费视频一区| 亚洲一级二级三级| 97久久精品人人爽人人爽蜜臀| 欧美一区二区不卡视频| 亚洲丝袜自拍清纯另类| 国产酒店精品激情| 欧美一区二区三区思思人| 亚洲精品一卡二卡| 不卡一卡二卡三乱码免费网站| 日韩欧美国产wwwww| 亚洲444eee在线观看| 91欧美一区二区| 国产日韩精品一区二区三区| 久久国产乱子精品免费女| 欧美日韩精品一区二区三区四区 | 亚洲丝袜自拍清纯另类| 国产精品资源在线观看| 日韩欧美在线网站| 日韩在线一区二区三区| 欧美视频你懂的| 一区二区三区高清| 色94色欧美sute亚洲线路一ni| 中文字幕国产一区二区| 国产91精品免费| 欧美激情在线免费观看| 国产精品一区二区视频| 久久综合色天天久久综合图片| 久久精品国产亚洲高清剧情介绍 | 91偷拍与自偷拍精品| 欧美激情在线一区二区| 成人涩涩免费视频| 中文字幕不卡在线| 成人午夜短视频| 国产精品丝袜久久久久久app| 国产成人一级电影| 国产精品人妖ts系列视频| 不卡一区中文字幕| 亚洲男人的天堂在线观看| 91美女片黄在线| 亚洲成人在线观看视频| 欧美电影影音先锋| 久久av中文字幕片| 国产午夜一区二区三区| www.色综合.com| 亚洲电影一级片| 欧美大片在线观看一区二区| 加勒比av一区二区| 中文字幕一区二区三区不卡在线| 91在线免费看| 婷婷久久综合九色综合绿巨人 | 久久久99久久| www.爱久久.com| 午夜精品久久久久久久99水蜜桃| 在线电影院国产精品| 黄网站免费久久| 一区二区三区产品免费精品久久75| 欧美日韩一区二区欧美激情| 日本成人在线不卡视频| 国产欧美一区二区精品忘忧草| 色婷婷国产精品| 麻豆精品视频在线| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲精品免费一二三区| 制服丝袜亚洲网站| 大陆成人av片| 青青草原综合久久大伊人精品 | 精品福利一二区| 91欧美激情一区二区三区成人| 免费xxxx性欧美18vr| 成人免费小视频| 欧美成人a∨高清免费观看| 91丨九色丨黑人外教| 精品一区二区三区香蕉蜜桃| 樱桃视频在线观看一区| 久久午夜羞羞影院免费观看| 色噜噜狠狠色综合欧洲selulu| 日本成人在线不卡视频| 一区2区3区在线看| 久久久久国产成人精品亚洲午夜| 成人av免费网站| 久久av资源网| 日本欧美一区二区在线观看| 成人欧美一区二区三区1314 | 欧美揉bbbbb揉bbbbb| 福利一区二区在线| 久久国产精品99久久人人澡| 亚洲小说欧美激情另类| 亚洲欧洲日韩一区二区三区| 精品三级在线观看| 91精品国产综合久久香蕉麻豆| 色综合久久综合中文综合网| 成人午夜电影网站| 国产精品羞羞答答xxdd| 久久精品国产精品亚洲精品| 午夜精品福利一区二区蜜股av| 亚洲视频中文字幕| 最新中文字幕一区二区三区| 久久网这里都是精品| 91精品国产高清一区二区三区蜜臀| 在线看一区二区| 91美女片黄在线| 一本一道综合狠狠老| kk眼镜猥琐国模调教系列一区二区 | 成人午夜电影小说| 国产a精品视频| 成人免费不卡视频| 成人av午夜电影| 91麻豆swag| 91一区二区在线| 91片黄在线观看| 欧洲一区在线观看| 欧美三级一区二区| 欧美色爱综合网| 欧美一区二区三区在线看| 欧美日韩久久不卡| 91精品国产91久久久久久一区二区 | 久久久久久影视| 久久久久久久久97黄色工厂| 国产网站一区二区| 国产精品色呦呦| 亚洲天堂久久久久久久| 夜夜夜精品看看| 日韩av在线免费观看不卡| 美女视频网站久久| 国产乱码精品一品二品| 国产+成+人+亚洲欧洲自线| 成人污视频在线观看| 97久久久精品综合88久久| 91国产精品成人| 欧美日韩二区三区| 久久综合九色综合欧美98| 国产亲近乱来精品视频| 18成人在线观看| 天堂成人免费av电影一区| 另类中文字幕网| 不卡在线观看av| 欧美三级资源在线| 精品国产一区二区三区av性色| 日本一区二区三区四区在线视频| 中文字幕亚洲电影| 日产欧产美韩系列久久99| 国产福利91精品| 欧美日精品一区视频|