Changeset f215c6ef in mainline for uspace/lib/c/generic/elf/elf_load.c
- Timestamp:
- 2025-01-26T21:33:13Z (7 weeks ago)
- Children:
- ea77c2d
- Parents:
- 31ea2a7
- git-author:
- Matěj Volf <git@…> (2025-01-26 21:04:16)
- git-committer:
- Matěj Volf <git@…> (2025-01-26 21:33:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/elf/elf_load.c
r31ea2a7 rf215c6ef 57 57 errno_t elf_load(int file, elf_info_t *info) 58 58 { 59 #ifdef CONFIG_RTLD 60 rtld_t *env; 61 #endif 59 62 errno_t rc = EOK; 63 elf_finfo_t *finfo = &info->finfo; 60 64 61 rc = elf_load_file(file, 0, &info->finfo);65 rc = elf_load_file(file, 0, finfo); 62 66 if (rc != EOK) { 63 67 DPRINTF("Failed to load executable '%s'.\n", file_name); … … 65 69 } 66 70 71 if (info->finfo.dynamic == NULL) { 72 /* Statically linked program */ 73 DPRINTF("Binary is statically linked.\n"); 74 info->env = NULL; 67 75 #ifdef CONFIG_RTLD 68 rtld_t *env; 69 rc = rtld_prog_process(&info->finfo, &env); 76 rc = rtld_init_static(finfo, &env); 77 info->env = env; 78 #endif 79 return EOK; 80 } 81 82 DPRINTF("Binary is dynamically linked.\n"); 83 #ifdef CONFIG_RTLD 84 DPRINTF("- prog dynamic: %p\n", finfo->dynamic); 85 rc = rtld_prog_process(finfo, &env); 70 86 info->env = env; 71 87 #else
Note:
See TracChangeset
for help on using the changeset viewer.