Lines Matching refs:mm
141 Elf_binary(App_model *mm, Const_dataspace bin)
142 : _mm(mm)
145 mm->local_attach_ds(bin, L4_PAGESIZE, 0));
162 mm->local_attach_ds(bin, phsize, phoffset));
285 App_model *mm;
288 Phdr_load(l4_addr_t base, Const_dataspace bin, App_model *mm,
290 : base(base), r_flags(r_flags), bin(bin), mm(mm), dbg(dbg)
300 mm->prog_attach_ds(l4_addr_t(paddr), L4_PAGESIZE,
301 mm->local_kip_ds(), 0, r_flags | L4Re::Rm::F::RX,
328 if ((ph.flags() & PF_W) || ph.memsz() > fsz || mm->all_segs_cow())
331 Dataspace mem = mm->alloc_ds(size);
332 mm->copy_ds(mem, 0, bin, offs, fsz + page_offs);
340 if (ph.flags() & PF_W || mm->all_segs_cow())
346 mm->prog_attach_ds(l4_addr_t(paddr), size, ds, o, rf,
359 App_model const *mm;
362 explicit Phdr_l4re_elf_aux_infos(App_model const *mm, Const_dataspace bin,
365 kip_addr(kip_addr), mm(mm), bin(bin)
376 l4_addr_t addr = mm->local_attach_ds(bin, h.filesz(), h.offset());
409 mm->local_detach_ds(addr, h.filesz());
418 App_model const *mm;
426 Phdr_dynamic(App_model const *mm, Const_dataspace bin, l4_addr_t base)
427 : mm(mm), bin(bin), base(base), phdrs(0),
444 char const *addr = (char const *)mm->local_attach_ds(bin, ph.filesz(), ph.offset());
450 mm->local_detach_ds(l4_addr_t(addr), ph.filesz());
524 void read_infos(App_model *mm, Const_dataspace bin,
529 Elf_binary<App_model> elf(mm, bin);
534 Phdr_l4re_elf_aux_infos<App_model> stack_info(mm, bin, mm->prog_info()->kip);
536 mm->stack()->set_target_stack(stack_info.stack_addr, stack_info.stack_size);
538 mm->prog_info()->kip = stack_info.kip_addr;
546 void load(App_model *mm, Const_dataspace bin, l4_addr_t *base, bool interpreter,
551 Elf_binary<App_model> elf(mm, bin);
571 chksys(mm->prog_reserve_area(&lib, b_func.end - b_func.start,
584 elf.iterate_phdr(Phdr_load<App_model, Dbg_log>(_base, bin, mm, r_flags, ldr));
585 elf.iterate_phdr(Phdr_l4re_elf_aux<App_model>(mm, bin));
587 mm->prog_info()->entry = elf.entry() + _base;
589 Phdr_dynamic<App_model> dyn_info(mm, bin, _base);
594 Prog_start_info *i = mm->prog_info();
604 Const_dataspace file = mm->open_file(dyn_info.interp);
607 load(mm, file, &base, true, ldr);
609 Prog_start_info *i = mm->prog_info();
618 void load(App_model *mm, Const_dataspace bin,
621 load(mm, bin, 0, false, ldr);