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

📄 bootloadlib.c

📁 This is a source code of VxWorks
💻 C
字号:
/* bootLoadLib.c - UNIX object module boot loader *//* Copyright 1984-1992 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01b,18jul92,smb  Changed errno.h to errnoLib.h.01a,01jun92,ajm  written: some culled from old loadLib*//*DESCRIPTIONThis library provides a generic bootstrap object module loading facility.  Anysupported format files may be loaded into memory.Modules may be loaded from any I/O stream.EXAMPLE.CS    fdX = open ("/devX/objFile", O_RDONLY);    close (fdX);.CEThis code fragment would load the object file "objFile" located ondevice "/devX/" into memory which would be allocated from the systemmemory pool.INCLUDE FILE: loadLib.hSEE ALSO: usrLib, symLib, memLib,.pG "Basic OS"*//* LINTLIBRARY */#include "vxWorks.h"#include "bootLoadLib.h"#include "errnoLib.h"/* define generic boot loader */FUNCPTR bootLoadRoutine = (FUNCPTR) NULL;/******************************************************************************** bootLoadModule - bootstrap load an object module into memory** This routine is the underlying routine to loadModuleAt().  This interface* allows specification of the the symbol table used to resolve undefined* external references and to which to add new symbols.** RETURNS:* OK, or* ERROR if can't read file or not enough memory or illegal file format** NOMANUAL*/STATUS bootLoadModule     (    FAST int fd,        /* fd from which to read module */    FUNCPTR *pEntry     /* entry point of module */    )    {    if (bootLoadRoutine == NULL)	{        errnoSet (S_bootLoadLib_ROUTINE_NOT_INSTALLED);	return (ERROR);	}    else	{        return ((bootLoadRoutine) (fd, pEntry));	}    }

⌨️ 快捷键说明

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