* @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. */
| 935 | * @return -RT_ERROR if any error occurs during the loading process. |
| 936 | */ |
| 937 | static 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. |
no test coverage detected