MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / elf_load_app

Function elf_load_app

components/lwp/lwp_elf.c:937–956  ·  view source on GitHub ↗

* @brief Load the ELF header and program header information. * * @param exec_info Pointer to the elf_info_t structure containing elf file information. * * @return RT_EOK if the ELF header and program header information are successfully loaded. * @return -RT_ERROR if any error occurs during the loading process. */

Source from the content-addressed store, hash-verified

935 * @return -RT_ERROR if any error occurs during the loading process.
936 */
937static int elf_load_app(elf_info_t *exec_info)
938{
939 int ret;
940
941 /* load elf header */
942 ret = elf_load_ehdr(exec_info);
943 if (ret != RT_EOK)
944 {
945 return ret;
946 }
947
948 /* load the ELF program header */
949 ret = elf_load_phdr(exec_info);
950 if (ret != RT_EOK)
951 {
952 return ret;
953 }
954
955 return ret;
956}
957
958/**
959 * @brief Load an ELF file into memory.

Callers 1

elf_file_loadFunction · 0.85

Calls 2

elf_load_ehdrFunction · 0.85
elf_load_phdrFunction · 0.85

Tested by

no test coverage detected