Changes in uspace/srv/loader/elf_load.c [a000878c:bae7bdc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/loader/elf_load.c
ra000878c rbae7bdc 2 2 * Copyright (c) 2006 Sergey Bondari 3 3 * Copyright (c) 2006 Jakub Jermar 4 * Copyright (c) 20 08Jiri Svoboda4 * Copyright (c) 2011 Jiri Svoboda 5 5 * All rights reserved. 6 6 * … … 53 53 #include <smc.h> 54 54 #include <loader/pcb.h> 55 #include <entry_point.h> 55 56 56 57 #include "elf.h" 57 58 #include "elf_load.h" 58 #include "arch.h"59 59 60 60 #define DPRINTF(...) … … 109 109 int fd; 110 110 int rc; 111 111 112 112 fd = open(file_name, O_RDONLY); 113 113 if (fd < 0) { … … 136 136 void elf_run(elf_info_t *info, pcb_t *pcb) 137 137 { 138 program_run(info->entry, pcb);138 entry_point_jmp(info->entry, pcb); 139 139 140 140 /* not reached */ … … 300 300 case PT_NULL: 301 301 case PT_PHDR: 302 case PT_NOTE: 302 303 break; 303 304 case PT_LOAD: … … 310 311 case PT_DYNAMIC: 311 312 case PT_SHLIB: 312 case PT_NOTE:313 313 case PT_LOPROC: 314 314 case PT_HIPROC: … … 344 344 seg_ptr = (void *) seg_addr; 345 345 346 DPRINTF("Load segment at addr %p, size 0x%x\n", seg_addr,346 DPRINTF("Load segment at addr %p, size 0x%x\n", (void *) seg_addr, 347 347 entry->p_memsz); 348 348 … … 372 372 mem_sz = entry->p_memsz + (entry->p_vaddr - base); 373 373 374 DPRINTF("Map to seg_addr=%p-%p.\n", seg_addr, 375 entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE)); 374 DPRINTF("Map to seg_addr=%p-%p.\n", (void *) seg_addr, 375 (void *) (entry->p_vaddr + bias + 376 ALIGN_UP(entry->p_memsz, PAGE_SIZE))); 376 377 377 378 /* … … 386 387 } 387 388 388 DPRINTF("as_area_create(%p, 0x%x, %d) -> 0x%lx\n",389 base + bias, mem_sz, flags, (uintptr_t)a);389 DPRINTF("as_area_create(%p, %#zx, %d) -> %p\n", 390 (void *) (base + bias), mem_sz, flags, (void *) a); 390 391 391 392 /* … … 464 465 (void *)((uint8_t *)entry->sh_addr + elf->bias); 465 466 DPRINTF("Dynamic section found at %p.\n", 466 (uintptr_t)elf->info->dynamic);467 (void *) elf->info->dynamic); 467 468 break; 468 469 default:
Note:
See TracChangeset
for help on using the changeset viewer.