Rev 3562 | Rev 3690 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3562 | Rev 3681 | ||
---|---|---|---|
Line 124... | Line 124... | ||
124 | close(fd); |
124 | close(fd); |
125 | 125 | ||
126 | return rc; |
126 | return rc; |
127 | } |
127 | } |
128 | 128 | ||
129 | /** Run an ELF executable. |
- | |
130 | * |
- | |
131 | * Transfers control to the entry point of an ELF executable loaded |
- | |
132 | * earlier with elf_load_file(). This function does not return. |
- | |
133 | * |
- | |
134 | * @param info Info structure filled earlier by elf_load_file() |
- | |
135 | */ |
- | |
136 | void elf_run(elf_info_t *info, pcb_t *pcb) |
- | |
137 | { |
- | |
138 | program_run(info->entry, pcb); |
- | |
139 | - | ||
140 | /* not reached */ |
- | |
141 | } |
- | |
142 | - | ||
143 | /** Create the program control block (PCB). |
129 | /** Create the program control block (PCB). |
144 | * |
130 | * |
145 | * Fills the program control block @a pcb with information from |
131 | * Fills the program control block @a pcb with information from |
146 | * @a info. |
132 | * @a info. |
147 | * |
133 | * |
Line 307... | Line 293... | ||
307 | break; |
293 | break; |
308 | case PT_LOAD: |
294 | case PT_LOAD: |
309 | return load_segment(elf, entry); |
295 | return load_segment(elf, entry); |
310 | break; |
296 | break; |
311 | case PT_INTERP: |
297 | case PT_INTERP: |
312 | /* Assume silently interp == "/lib/rtld" */ |
298 | /* Assume silently interp == "/app/dload" */ |
313 | elf->info->interp = "/lib/rtld"; |
299 | elf->info->interp = "/app/dload"; |
314 | break; |
300 | break; |
315 | case PT_DYNAMIC: |
301 | case PT_DYNAMIC: |
316 | case PT_SHLIB: |
302 | case PT_SHLIB: |
317 | case PT_NOTE: |
303 | case PT_NOTE: |
318 | case PT_LOPROC: |
304 | case PT_LOPROC: |