Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3672 → Rev 3673

/branches/dynload/uspace/lib/rtld/rtld.c
49,7 → 49,7
 
void program_run(void *entry, pcb_t *pcb);
 
void _rtld_main(void)
static void rtld_main(void)
{
static module_t prog;
// module_t *rtld;
75,7 → 75,6
/* Initialize list of loaded modules */
list_initialize(&runtime_env.modules_head);
list_append(&prog.modules_link, &runtime_env.modules_head);
// list_append(&rtld->modules_link, &runtime_env.modules_head);
 
/* Pointer to program module. Used as root of the dependency graph */
runtime_env.program = &prog;
98,12 → 97,11
/*
* Finally, run the main program.
*/
DPRINTF("Run program.. (at 0x%x)\n", (uintptr_t)__pcb->entry);
DPRINTF("Run program.. (at 0x%lx)\n", (uintptr_t)__pcb->entry);
 
#ifndef RTLD_DEBUG
close_console();
#endif
//__pcb->entry();
program_run(__pcb->entry, __pcb);
}
 
110,21 → 108,9
/** Fake main to satisfy dependency from libc */
int main(int argc, char *argv[])
{
rtld_main();
return 0;
}
/*
typedef void (*ep2)(void *);
 
void program_run(void *entry, pcb_t *pcb)
{
asm (
// "xorl %%ebx, %%ebx\n"
// "movl 0(%%ebx), %%ecx\n"
"mov %%eax, %%ebx\n"
"jmp *%0\n"
:: "m" (entry), "a" (pcb)
);
}*/
 
/** @}
*/