Changes in uspace/lib/c/generic/dlfcn.c [c6f1eb05:153c7a29] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/dlfcn.c
rc6f1eb05 r153c7a29 42 42 43 43 #include <rtld/module.h> 44 #include <rtld/rtld.h> 44 45 #include <rtld/symbol.h> 45 46 … … 48 49 module_t *m; 49 50 50 if (runtime_env == NULL) { 51 printf("Dynamic linker not set up -- initializing.\n"); 52 rtld_init_static(); 53 } 54 55 printf("dlopen(\"%s\", %d)\n", path, flag); 56 57 printf("module_find('%s')\n", path); 58 m = module_find(path); 51 m = module_find(runtime_env, path); 59 52 if (m == NULL) { 60 printf("NULL. module_load('%s')\n", path); 61 m = module_load(path); 62 printf("module_load_deps(m)\n"); 63 module_load_deps(m); 53 m = module_load(runtime_env, path, mlf_local); 54 module_load_deps(m, mlf_local); 64 55 /* Now relocate. */ 65 printf("module_process_relocs(m)\n");66 56 module_process_relocs(m); 67 } else {68 printf("not NULL\n");69 57 } 70 58 … … 80 68 module_t *sm; 81 69 82 printf("dlsym(0x%lx, \"%s\")\n", (long)mod, sym_name);83 70 sd = symbol_bfs_find(sym_name, (module_t *) mod, &sm); 84 71 if (sd != NULL) { 85 return symbol_get_addr(sd, sm );72 return symbol_get_addr(sd, sm, __tcb_get()); 86 73 } 87 74
Note:
See TracChangeset
for help on using the changeset viewer.