Changeset 49093a4 in mainline for uspace/srv/loader/main.c
- Timestamp:
- 2008-12-05T22:44:24Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b1f860
- Parents:
- 965dc18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/loader/main.c
r965dc18 r49093a4 60 60 #include <elf_load.h> 61 61 62 /**63 * Bias used for loading the dynamic linker. This will be soon replaced64 * by automatic placement.65 */66 #define RTLD_BIAS 0x8000067 68 62 /** Pathname of the file that will be loaded */ 69 63 static char *pathname = NULL; … … 230 224 int rc; 231 225 232 // printf("Load program '%s'\n", pathname);233 234 226 rc = elf_load_file(pathname, 0, &prog_info); 235 227 if (rc < 0) { 236 printf(" failed to load program\n");228 printf("Failed to load executable '%s'.\n", pathname); 237 229 ipc_answer_0(rid, EINVAL); 238 230 return 1; 239 231 } 240 232 241 // printf("Create PCB\n");242 233 elf_create_pcb(&prog_info, &pcb); 243 234 … … 247 238 if (prog_info.interp == NULL) { 248 239 /* Statically linked program */ 249 // printf("Run statically linked program\n");250 // printf("entry point: 0x%lx\n", prog_info.entry);251 240 is_dyn_linked = false; 252 241 ipc_answer_0(rid, EOK); … … 254 243 } 255 244 256 printf("Load dynamic linker '%s'\n", prog_info.interp); 257 rc = elf_load_file("/rtld.so", RTLD_BIAS, &interp_info); 245 rc = elf_load_file(prog_info.interp, 0, &interp_info); 258 246 if (rc < 0) { 259 printf(" failed to load dynamic linker\n");247 printf("Failed to load interpreter '%s.'\n", prog_info.interp); 260 248 ipc_answer_0(rid, EINVAL); 261 249 return 1; 262 250 } 263 264 /*265 * Provide dynamic linker with some useful data266 */267 pcb.rtld_dynamic = interp_info.dynamic;268 pcb.rtld_bias = RTLD_BIAS;269 251 270 252 is_dyn_linked = true;
Note:
See TracChangeset
for help on using the changeset viewer.