Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3561 → Rev 3562

/branches/dynload/uspace/lib/rtld/module.c
53,7 → 53,7
*/
void module_process_relocs(module_t *m)
{
printf("module_process_relocs('%s')\n", m->dyn.soname);
DPRINTF("module_process_relocs('%s')\n", m->dyn.soname);
if (m->dyn.plt_rel == DT_REL) {
if (m->dyn.rel != NULL)
rel_table_process(m, m->dyn.rel, m->dyn.rel_sz);
61,9 → 61,9
if (m->dyn.jmp_rel != NULL)
rel_table_process(m, m->dyn.jmp_rel, m->dyn.plt_rel_sz);
} else { /* (m->dyn.plt_rel == DT_RELA) */
printf("table type DT_RELA\n");
DPRINTF("table type DT_RELA\n");
if (m->dyn.rela != NULL) {
printf("non-empty\n");
DPRINTF("non-empty\n");
rela_table_process(m, m->dyn.rela, m->dyn.rela_sz);
}
}
133,7 → 133,7
 
/* FIXME: need to vary bias / allocate address space */
m->bias = 0x20000;
printf("filename:'%s'\n", name_buf);
DPRINTF("filename:'%s'\n", name_buf);
 
rc = elf_load_file(name_buf, m->bias, ELDF_RW, &info);
if (rc < 0) {
141,7 → 141,7
exit(1);
}
 
printf("parse dynamic section\n");
DPRINTF("parse dynamic section\n");
/* Parse ELF .dynamic section. Store info to m->dyn. */
dynamic_parse(info.dynamic, m->bias, &m->dyn);
 
193,7 → 193,7
if (dp->d_tag == DT_NEEDED) {
dep_name = m->dyn.str_tab + dp->d_un.d_val;
 
printf("%s needs %s\n", m->dyn.soname, dep_name);
DPRINTF("%s needs %s\n", m->dyn.soname, dep_name);
dm = module_find(dep_name);
if (!dm) {
dm = module_load(dep_name);