Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/dlfcn.c

    r153c7a29 rc6f1eb05  
    4242
    4343#include <rtld/module.h>
    44 #include <rtld/rtld.h>
    4544#include <rtld/symbol.h>
    4645
     
    4948        module_t *m;
    5049
    51         m = module_find(runtime_env, path);
     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);
    5259        if (m == NULL) {
    53                 m = module_load(runtime_env, path, mlf_local);
    54                 module_load_deps(m, mlf_local);
     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);
    5564                /* Now relocate. */
     65                printf("module_process_relocs(m)\n");
    5666                module_process_relocs(m);
     67        } else {
     68                printf("not NULL\n");
    5769        }
    5870
     
    6880        module_t *sm;
    6981
     82        printf("dlsym(0x%lx, \"%s\")\n", (long)mod, sym_name);
    7083        sd = symbol_bfs_find(sym_name, (module_t *) mod, &sm);
    7184        if (sd != NULL) {
    72                 return symbol_get_addr(sd, sm, __tcb_get());
     85                return symbol_get_addr(sd, sm);
    7386        }
    7487
Note: See TracChangeset for help on using the changeset viewer.