Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3676 → Rev 3677

/branches/dynload/uspace/lib/rtld/rtld.c
52,21 → 52,14
static void rtld_main(void)
{
static module_t prog;
// module_t *rtld;
 
DPRINTF("Hello, world! (from rtld)\n");
 
/*
* First we need to process dynamic sections of the two modules
* that have been already loaded, that is, of ourselves and of
* the executable program.
* First we need to process dynamic sections of the executable
* program and insert it into the module graph.
*/
 
/* rtld_dynamic and rtld->bias were filled out by the bootstrap code */
// rtld = &runtime_env.rtld;
// DPRINTF("Parse rtld .dynamic section at 0x%x\n", runtime_env.rtld_dynamic);
// dynamic_parse(runtime_env.rtld_dynamic, rtld->bias, &rtld->dyn);
 
DPRINTF("Parse program .dynamic section at 0x%x\n", __pcb->dynamic);
dynamic_parse(__pcb->dynamic, 0, &prog.dyn);
prog.bias = 0;
76,7 → 69,7
list_initialize(&runtime_env.modules_head);
list_append(&prog.modules_link, &runtime_env.modules_head);
 
/* Pointer to program module. Used as root of the dependency graph */
/* Pointer to program module. Used as root of the module graph. */
runtime_env.program = &prog;
 
/*
105,7 → 98,6
program_run(__pcb->entry, __pcb);
}
 
/** Fake main to satisfy dependency from libc */
int main(int argc, char *argv[])
{
rtld_main();