Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2980 → Rev 2981

/branches/dynload/uspace/lib/rtld/symbol.c
52,7 → 52,7
char *module_name;
 
module_name = m->dyn.soname;
printf("def_find_in_module('%s', %s)\n", name, module_name);
// printf("def_find_in_module('%s', %s)\n", name, module_name);
 
sym_table = m->dyn.sym_tab;
nchain = m->dyn.hash[1];
60,19 → 60,19
for (i = 0; i < nchain; ++i) {
sym = &sym_table[i];
s_name = m->dyn.str_tab + sym->st_name;
printf("cmp sym '%s'\n", s_name);
// printf("cmp sym '%s'\n", s_name);
if (strcmp(name, s_name) == 0) {
printf("name match\n");
// printf("name match\n");
if (sym->st_shndx != SHN_UNDEF) {
printf("definition found. idx=%d\n", i);
// printf("definition found. idx=%d\n", i);
return sym;
} else {
printf("not a definition\n");
// printf("not a definition\n");
}
}
}
 
printf("not found\n");
// printf("not found\n");
return NULL;
}
 
87,8 → 87,8
sym = def_find_in_module(name, runtime_env.libc);
if (sym != NULL) { *m = runtime_env.libc; return sym; }
 
/* sym = def_find_in_module(name, runtime_env.rtld);
if (sym != NULL) { *m = runtime_env.rtld; return sym; }*/
sym = def_find_in_module(name, &runtime_env.rtld);
if (sym != NULL) { *m = &runtime_env.rtld; return sym; }
 
printf("symbol found nowhere\n");
*m = NULL;