rl_load_buffer. STMicroelectronics STxP70
Реклама
Реклама
Relocatable loader library UM1237
rl_load_buffer
Definition:
int rl_load_buffer(
rl_handle_t *handle,
const char *image);
Arguments:
handle image
Load a relocatable module into memory
The handle for the module.
The image of the load module.
Returns:
Description:
Returns 0 for success, -1 for failure.
The rl_load_buffer() function loads a relocatable module into memory from the image referenced by image.
It allocates the space for the loaded module in the heap, loads the segments from the memory image of the loadable module, links the module to the parent module of the handle and relocates and initializes the loaded module.
This function calls the action callback functions for RL_ACTION_LOAD after loading and before executing any code in the loaded module.
The value 0 is returned if the loading was successful. The value -1 is returned on failure and the error code returned by rl_errno() is set accordingly.
rl_load_file
Definition:
Load a relocatable module into memory from a file
int rl_load_file(
rl_handle_t *handle,
const char *f_name);
Arguments:
Returns:
Description:
handle f_name
The handle for the module.
The file from which to load the relocatable module.
Returns 0 for success, -1 for failure.
The rl_load_file() function loads a relocatable module into memory from the file specified by f_name.
It opens the specified file with an fopen() call, allocates the space for the loaded module in the heap, loads the segments from the file, links the module to the parent module of the handle, relocates and initializes the loaded module. The file is closed with fclose() before returning. This function calls the action callback functions for the RL_ACTION_LOAD after loading and before executing any code in the loaded module.
0
is returned if the load was successful, -1 is returned on failure and the error code returned by rl_errno() is set accordingly.
148/166 8027948 Rev 15
Изтегляне
Реклама