Changes in uspace/lib/c/generic/rtld/module.c [bfdb5af1:8a1fb09] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rtld/module.c
rbfdb5af1 r8a1fb09 35 35 */ 36 36 37 #include <adt/list.h>38 #include <elf/elf_load.h>39 #include <fcntl.h>40 #include <loader/pcb.h>41 37 #include <stdio.h> 42 38 #include <stdlib.h> 43 39 #include <unistd.h> 40 #include <fcntl.h> 41 #include <adt/list.h> 42 #include <loader/pcb.h> 44 43 45 44 #include <rtld/rtld.h> … … 48 47 #include <rtld/rtld_arch.h> 49 48 #include <rtld/module.h> 49 #include <elf_load.h> 50 50 51 51 /** (Eagerly) process all relocation tables in a module. … … 93 93 module_t *module_find(const char *name) 94 94 { 95 link_t *head = &runtime_env->modules_head; 96 97 link_t *cur; 95 98 module_t *m; 96 99 const char *p, *soname; … … 107 110 108 111 /* Traverse list of all modules. Not extremely fast, but simple */ 109 list_foreach(runtime_env->modules, cur) { 112 DPRINTF("head = %p\n", head); 113 for (cur = head->next; cur != head; cur = cur->next) { 110 114 DPRINTF("cur = %p\n", cur); 111 115 m = list_get_instance(cur, module_t, modules_link); … … 173 177 174 178 /* Insert into the list of loaded modules */ 175 list_append(&m->modules_link, &runtime_env->modules );179 list_append(&m->modules_link, &runtime_env->modules_head); 176 180 177 181 return m; … … 245 249 void modules_process_relocs(module_t *start) 246 250 { 247 module_t *m; 248 249 list_foreach(runtime_env->modules, cur) { 251 link_t *head = &runtime_env->modules_head; 252 253 link_t *cur; 254 module_t *m; 255 256 for (cur = head->next; cur != head; cur = cur->next) { 250 257 m = list_get_instance(cur, module_t, modules_link); 251 258 … … 261 268 void modules_untag(void) 262 269 { 263 module_t *m; 264 265 list_foreach(runtime_env->modules, cur) { 270 link_t *head = &runtime_env->modules_head; 271 272 link_t *cur; 273 module_t *m; 274 275 for (cur = head->next; cur != head; cur = cur->next) { 266 276 m = list_get_instance(cur, module_t, modules_link); 267 277 m->bfs_tag = false;
Note:
See TracChangeset
for help on using the changeset viewer.