Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3561 → Rev 3562

/branches/dynload/uspace/lib/rtld/rtld.c
54,7 → 54,7
static module_t prog;
// module_t *rtld;
 
printf("Hello, world! (from rtld)\n");
DPRINTF("Hello, world! (from rtld)\n");
 
/*
* First we need to process dynamic sections of the two modules
64,10 → 64,10
 
/* rtld_dynamic and rtld->bias were filled out by the bootstrap code */
// rtld = &runtime_env.rtld;
// printf("Parse rtld .dynamic section at 0x%x\n", runtime_env.rtld_dynamic);
// DPRINTF("Parse rtld .dynamic section at 0x%x\n", runtime_env.rtld_dynamic);
// dynamic_parse(runtime_env.rtld_dynamic, rtld->bias, &rtld->dyn);
 
printf("Parse program .dynamic section at 0x%x\n", __pcb->dynamic);
DPRINTF("Parse program .dynamic section at 0x%x\n", __pcb->dynamic);
dynamic_parse(__pcb->dynamic, 0, &prog.dyn);
prog.bias = 0;
prog.dyn.soname = "[program]";
84,7 → 84,7
* Now we can continue with loading all other modules.
*/
 
printf("Load all program dependencies\n");
DPRINTF("Load all program dependencies\n");
module_load_deps(&prog);
 
/*
92,13 → 92,17
*/
 
/* Process relocations in all modules */
printf("Relocate all modules\n");
DPRINTF("Relocate all modules\n");
modules_process_relocs();
 
/*
* Finally, run the main program.
*/
printf("Run program.. (at 0x%x)\n", (uintptr_t)__pcb->entry);
DPRINTF("Run program.. (at 0x%x)\n", (uintptr_t)__pcb->entry);
 
#ifndef RTLD_DEBUG
close_console();
#endif
//__pcb->entry();
program_run(__pcb->entry, __pcb);
}