Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3685 → Rev 3686

/branches/dynload/uspace/lib/rtld/module.c
77,12 → 77,15
*/
module_t *module_find(char *name)
{
link_t *head = &runtime_env.modules_head;
link_t *head = &runtime_env->modules_head;
 
link_t *cur;
module_t *m;
char *p, *soname;
 
printf("got head ptr\n");
printf(" = 0x%lx\n", (long) head);
 
/*
* If name contains slashes, treat it as a pathname and
* construct soname by chopping off the path. Otherwise
90,9 → 93,12
*/
p = strrchr(name, '/');
soname = p ? (p + 1) : name;
 
printf("did strrchr. soname='%s'\n", soname);
/* Traverse list of all modules. Not extremely fast, but simple */
for (cur = head->next; cur != head; cur = cur->next) {
printf("get_instance...\n");
m = list_get_instance(cur, module_t, modules_link);
if (strcmp(m->dyn.soname, soname) == 0) {
return m; /* Found */
146,7 → 152,7
dynamic_parse(info.dynamic, m->bias, &m->dyn);
 
/* Insert into the list of loaded modules */
list_append(&m->modules_link, &runtime_env.modules_head);
list_append(&m->modules_link, &runtime_env->modules_head);
 
return m;
}
209,7 → 215,7
 
void modules_process_relocs(void)
{
link_t *head = &runtime_env.modules_head;
link_t *head = &runtime_env->modules_head;
 
link_t *cur;
module_t *m;
218,7 → 224,7
m = list_get_instance(cur, module_t, modules_link);
 
/* Skip rtld, since it has already been processed */
if (m != &runtime_env.rtld) {
if (m != &runtime_env->rtld) {
module_process_relocs(m);
}
}
228,7 → 234,7
*/
void modules_untag(void)
{
link_t *head = &runtime_env.modules_head;
link_t *head = &runtime_env->modules_head;
 
link_t *cur;
module_t *m;