-__exec_remap_heap(struct ld_param* param, struct proc_mm* pvms)
-{
- if (pvms->heap) {
- mem_unmap_region(param->vms_mnt, pvms->heap);
- }
-
- struct mmap_param map_param = { .pvms = pvms,
- .vms_mnt = param->vms_mnt,
- .flags = MAP_ANON | MAP_PRIVATE | MAP_FIXED,
- .type = REGION_TYPE_HEAP,
- .proct = PROT_READ | PROT_WRITE,
- .mlen = DEFAULT_HEAP_PAGES * PG_SIZE };
- int status = 0;
- struct mm_region* heap;
- if ((status = mem_map(NULL, &heap, param->info.end, NULL, &map_param))) {
- param->status |= LD_STAT_FKUP;
- return status;
- }
-
- heap->region_copied = __heap_copied;
- mm_index((void**)&pvms->heap, heap);
-}
-
-int
-exec_loadto(struct ld_param* param,
- struct v_file* executable,
- const char** argv,
- const char** envp)
+exec_load(struct exec_container* container,
+ struct v_file* executable,
+ const char** argv,
+ const char** envp)