Changeset f215c6ef in mainline for uspace/lib/c/generic/rtld/module.c
- Timestamp:
- 2025-01-26T21:33:13Z (4 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/rtld/module.c
r31ea2a7 rf215c6ef 61 61 * @return EOK on success, ENOMEM if out of memory 62 62 */ 63 errno_t module_create_static_exec( rtld_t *rtld, module_t **rmodule)63 errno_t module_create_static_exec(const void *elf, rtld_t *rtld) 64 64 { 65 65 module_t *module; … … 79 79 80 80 const elf_segment_header_t *tls = 81 elf_get_phdr( __progsymbols.elfstart, PT_TLS);81 elf_get_phdr(elf, PT_TLS); 82 82 83 83 if (tls) { 84 uintptr_t bias = elf_get_bias( __progsymbols.elfstart);84 uintptr_t bias = elf_get_bias(elf); 85 85 module->tdata = (void *) (tls->p_vaddr + bias); 86 86 module->tdata_size = tls->p_filesz; … … 95 95 96 96 list_append(&module->modules_link, &rtld->modules); 97 98 if (rmodule != NULL)99 *rmodule = module;100 97 return EOK; 101 98 }
Note:
See TracChangeset
for help on using the changeset viewer.