WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
Dynamic loading
Dynamic loading 的协作图:

结构体

struct  tagDynloadParam
 

宏定义

#define LOS_DL_HEAP_SIZE   0
 

类型定义

typedef struct tagDynloadParam DYNLOAD_PARAM_S
 

枚举

enum  LOAD_STRATEGY { ZIP , NOZIP }
 

函数

void LOS_DynParamReg (const DYNLOAD_PARAM_S *dynloadParam)
 Register the dynamic parameters.
 
void * LOS_SoLoad (const CHAR *elfFileName)
 Load a shared object file.
 
void * LOS_MemLoad (const CHAR *elfFileName, UINT32 fileNameLen, const CHAR *elfFileBuf, UINT32 bufLen)
 Load a shared object file(.so) or relocatable object file(.o) from the memory.
 
void * LOS_ObjLoad (const CHAR *elfFileName)
 Load an relocatable object file(.o).
 
INT32 LOS_ModuleUnload (void *handle)
 Unload a module.
 
void LOS_LdDestroy (void)
 Destroy a dynamic loader.
 
void * LOS_FindSymByName (void *handle, CHAR *name)
 Search for a symbol address.
 
INT32 LOS_PathAdd (CHAR *path)
 Add a default path.
 
BOOL LOS_DynMemPoolSet (void *memPool)
 Set the memory pool address used by dynload
 

详细描述

宏定义说明

◆ LOS_DL_HEAP_SIZE

#define LOS_DL_HEAP_SIZE   0

Size of Dynload heap in bytes (1MB = 0x100000 Bytes) Starting address of dynload heap

类型定义说明

◆ DYNLOAD_PARAM_S

Define the structure of the parameters used for dynamic.

Information of specified parameters passed in during dynamic load.

枚举类型说明

◆ LOAD_STRATEGY

Define an enum type indicates load strategy.

Type of load strategy of dynamic load, ZIP means using zipped shared object, NOZIP means using normal shared object.

枚举值
ZIP 
NOZIP 

函数说明

◆ LOS_DynMemPoolSet()

BOOL LOS_DynMemPoolSet ( void *  memPool)
extern

Set the memory pool address used by dynload

Description:
This API is used to set the memory pool address used by dynload.
注意
  • The parameter passed to this API should be a legal memory pool address by managed with LiteOS's memory algorithm, and whose value is outside of the LiteOS system memory
参数
memPool[IN] the memory pool address.
返回值
TRUESet successful.
FALSESet failed.
Dependency:
参见
LOS_ModuleUnload
自从
Huawei LiteOS V200R002C00

◆ LOS_DynParamReg()

void LOS_DynParamReg ( const DYNLOAD_PARAM_S dynloadParam)
extern

Register the dynamic parameters.

Description:
This API is used to register the dynamic load parameters.
注意
参数
dynloadParam[IN] dynamic load parameters to be registered.
Dependency:
参见
LOS_FindSymByName | LOS_LdDestroy
自从
Huawei LiteOS V100R001C00

◆ LOS_FindSymByName()

void * LOS_FindSymByName ( void *  handle,
CHAR name 
)
extern

Search for a symbol address.

Description:
This API is used to search for the address of a symbol according to a particular module handle and symbol name.
注意
  • If the value of handle is NULL, Huawei LiteOS searches for symbols (including system symbols) in the global symbol table. If handle is set to a valid module handle, Huawei LiteOS searches for symbols in the module that comes with the module handle.
参数
handle[IN] Module handle.
name[IN] Name of the symbol to be searched for.
返回值
NULLThe symbol address is not found.
VOID*Symbol address.
Dependency:
参见
LOS_LdDestroy
自从
Huawei LiteOS V100R001C00

◆ LOS_LdDestroy()

void LOS_LdDestroy ( void  )
extern

Destroy a dynamic loader.

Description:
This API is used to destroy a dynamic linker.
注意
  • When dynamic loading is no longer needed, call this API to destroy the dynamic linker.
参数
None.
返回值
None.
Dependency:
参见
LOS_FindSymByName
自从
Huawei LiteOS V100R001C00

◆ LOS_MemLoad()

void * LOS_MemLoad ( const CHAR elfFileName,
UINT32  fileNameLen,
const CHAR elfFileBuf,
UINT32  bufLen 
)
extern

Load a shared object file(.so) or relocatable object file(.o) from the memory.

Description:
This API is used to load a shared or relocatable object file that is in memory.
注意
  • The shared object file does not depend on other shared objects.
参数
elfFileName[IN] Shared or relocatable object file name.
fileNameLen[IN] The length of shared or relocatable object file name.
elfFileBuf[IN] Shared or relocatable object file buffer in memory.
bufLen[IN] the length of shared or relocatable file buffer in memory.
返回值
NULLThe shared or relocatable object file fails to be loaded.
VOID*The shared or relocatable object file is successfully loaded.
Dependency:
参见
LOS_ModuleUnload
自从
Huawei LiteOS V200R003C00

◆ LOS_ModuleUnload()

INT32 LOS_ModuleUnload ( void *  handle)
extern

Unload a module.

Description:
This API is used to unload a module with a particular module handle.
注意
  • None.
参数
handle[IN] Module handle.
返回值
LOS_NOKThe module fails to be unloaded.
LOS_OKThe module is successfully unloaded.
Dependency:
参见
LOS_ObjLoad
自从
Huawei LiteOS V100R001C00

◆ LOS_ObjLoad()

void * LOS_ObjLoad ( const CHAR elfFileName)
extern

Load an relocatable object file(.o).

Description:
This API is used to load an relocatable object file under a particular module file path.
注意
  • The parameter passed to this API should be a legal path of an relocatable object file.
参数
elfFileName[IN] Relocatable object file path.
返回值
NULLThe relocatable object file fails to be loaded.
VOID*The relocatable object file is successfully loaded.
Dependency:
参见
LOS_ModuleUnload
自从
Huawei LiteOS V100R001C00

◆ LOS_PathAdd()

INT32 LOS_PathAdd ( CHAR path)
extern

Add a default path.

Description:
This API is used to add a path to default paths.
注意
参数
path[IN] Path to be added to default paths.
返回值
LOS_NOKThe path is added unsuccessfully.
LOS_OKThe path is added successfully.
Dependency:
参见
LOS_FindSymByName | LOS_LdDestroy
自从
Huawei LiteOS V100R001C00

◆ LOS_SoLoad()

void * LOS_SoLoad ( const CHAR elfFileName)
extern

Load a shared object file.

Description:
This API is used to load a shared object file under a particular module file path.
注意
  • The parameter passed to this API should be a legal path of a shared object file.
参数
elfFileName[IN] Shared object file path.
返回值
NULLThe shared object file fails to be loaded.
VOID*The shared object file is successfully loaded.
Dependency:
参见
LOS_ModuleUnload
自从
Huawei LiteOS V100R001C00