rl_handle_new. STMicroelectronics STxP70
Reklama
Reklama
UM1237 Relocatable loader library
rl_handle_new
Definition:
rl_handle_t *rl_handle_new(
const rl_handle_t *parent,
int mode);
Allocate and initialize a new handle
Arguments:
parent mode
mode
The handle of the parent module.
Determines the RL_LIB chunk mode. Valid values for mode are:
RL_ONE_CHUNK_MODE
(defined to be 0)
RL_MULTIPLE_CHUNK_MODE
(defined to be 1)
Returns:
Description:
The newly initialized handle.
The rl_handle_new() function allocates and initializes a new handle that can be used for loading and unloading a load module.
The handle of the parent module to which the loaded module will be connected is specified by the parent argument.
In RL_MULTIPLE_CHUNK_MODE, the mode argument activates two separate memory allocators: rl_text_memalign for text segments and rl_data_memalign for data segments. In RL_ONE_CHUNK_MODE, the mode argument activates one global memory allocator rl_memalign, for any segment type.
Generally, a load module will be attached to the module using this function, therefore a handle will typically be allocated as follows: rl_handle_t *new_handle = rl_handle_new(rl_this(),
RL_ONE_CHUNK_MODE);
rl_handle_delete
Definition:
int rl_handle_delete(
rl_handle_t *handle);
Arguments:
Finalize and deallocate a module handle
handle
The handle to deallocate.
Returns:
Description:
Returns 0 for success, -1 for failure.
The rl_handle_delete() function finalizes and deallocates a module handle.
The handle must not hold a loaded module. The loaded module must have been first unloaded by rl_unload() before calling this function. If successful, the value returned is 0. Otherwise the value returned is -1 and the error code returned by rl_errno()
is set accordingly.
8027948 Rev 15 145/166
Preuzimanje
Reklama