diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-29 18:47:16 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-29 18:49:28 +0200 |
| commit | 4e5595a089c815febd7a0d42ab62940bf13f73ac (patch) | |
| tree | 322f35d9315e9966de8a66052811858df0144085 /common/elf.c | |
| parent | a12e50e5a7dae52ed8bd5a24cc6576371e20985b (diff) | |
| download | kmi-4e5595a089c815febd7a0d42ab62940bf13f73ac.tar.gz kmi-4e5595a089c815febd7a0d42ab62940bf13f73ac.zip | |
Preparations for refactoring
Diffstat (limited to 'common/elf.c')
| -rw-r--r-- | common/elf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/elf.c b/common/elf.c index c73d56c..fafef00 100644 --- a/common/elf.c +++ b/common/elf.c @@ -15,7 +15,7 @@ static void __map_exec(struct tcb *t, vm_t bin, uint8_t ei_c, vm_t phstart, size size_t vsz = program_header_prop(ei_c, runner, p_memsz); vm_t start = 0; - if(!(start = alloc_fixed_region(&t->sp_r, va, vsz, 0))) + if(!(start = alloc_fixed_region(&t->sp_r, va, vsz, &vsz))) return; /* out of memory or something */ uint8_t vflags = VM_V | VM_U; @@ -36,6 +36,9 @@ static void __map_exec(struct tcb *t, vm_t bin, uint8_t ei_c, vm_t phstart, size memcpy((void *)va, (void *)vo, vfz); /* skip while testing + * TODO: also fix, this fixes only the first region. Create new + * function? + * pm_t paddr = 0; stat_vmem(t->b_r, va, &paddr, 0, 0); mod_vmem(t->b_r, va, paddr, vflags); |
