/branches/dynload/uspace/srv/loader/include/elf_load.h |
---|
83,7 → 83,6 |
int elf_load_file(char *file_name, size_t so_bias, eld_flags_t flags, |
elf_info_t *info); |
void elf_run(elf_info_t *info, pcb_t *pcb); |
void elf_create_pcb(elf_info_t *info, pcb_t *pcb); |
#endif |
/branches/dynload/uspace/srv/loader/main.c |
---|
59,6 → 59,8 |
#include <elf.h> |
#include <elf_load.h> |
void program_run(void *entry, pcb_t *pcb); |
/** Pathname of the file that will be loaded */ |
static char *pathname = NULL; |
276,13 → 278,13 |
close_console(); |
ipc_answer_0(rid, EOK); |
elf_run(&interp_info, &pcb); |
program_run(interp_info.entry, &pcb); |
} else { |
/* Statically linked program */ |
close_console(); |
ipc_answer_0(rid, EOK); |
elf_run(&prog_info, &pcb); |
program_run(prog_info.entry, &pcb); |
} |
/* Not reached */ |
/branches/dynload/uspace/srv/loader/elf_load.c |
---|
126,20 → 126,6 |
return rc; |
} |
/** Run an ELF executable. |
* |
* Transfers control to the entry point of an ELF executable loaded |
* earlier with elf_load_file(). This function does not return. |
* |
* @param info Info structure filled earlier by elf_load_file() |
*/ |
void elf_run(elf_info_t *info, pcb_t *pcb) |
{ |
program_run(info->entry, pcb); |
/* not reached */ |
} |
/** Create the program control block (PCB). |
* |
* Fills the program control block @a pcb with information from |
309,8 → 295,8 |
return load_segment(elf, entry); |
break; |
case PT_INTERP: |
/* Assume silently interp == "/lib/rtld" */ |
elf->info->interp = "/lib/rtld"; |
/* Assume silently interp == "/app/dload" */ |
elf->info->interp = "/app/dload"; |
break; |
case PT_DYNAMIC: |
case PT_SHLIB: |