?? bootloadlib.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 + -