Home
last modified time | relevance | path

Searched refs:ph (Results 1 – 2 of 2) sorted by relevance

/xv6-public/
H A Dbootmain.c21 struct proghdr *ph, *eph; in bootmain() local
35 ph = (struct proghdr*)((uchar*)elf + elf->phoff); in bootmain()
36 eph = ph + elf->phnum; in bootmain()
37 for(; ph < eph; ph++){ in bootmain()
38 pa = (uchar*)ph->paddr; in bootmain()
39 readseg(pa, ph->filesz, ph->off); in bootmain()
40 if(ph->memsz > ph->filesz) in bootmain()
41 stosb(pa + ph->filesz, 0, ph->memsz - ph->filesz); in bootmain()
H A Dexec.c18 struct proghdr ph; in exec() local
43 for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ in exec()
44 if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) in exec()
46 if(ph.type != ELF_PROG_LOAD) in exec()
48 if(ph.memsz < ph.filesz) in exec()
50 if(ph.vaddr + ph.memsz < ph.vaddr) in exec()
52 if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) in exec()
54 if(ph.vaddr % PGSIZE != 0) in exec()
56 if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) in exec()