elf 20 bootmain.c struct elfhdr *elf; elf 25 bootmain.c elf = (struct elfhdr*)0x10000; // scratch space elf 28 bootmain.c readseg((uchar*)elf, 4096, 0); elf 31 bootmain.c if(elf->magic != ELF_MAGIC) elf 35 bootmain.c ph = (struct proghdr*)((uchar*)elf + elf->phoff); elf 36 bootmain.c eph = ph + elf->phnum; elf 46 bootmain.c entry = (void(*)(void))(elf->entry); elf 8 elf.h uchar elf[12]; elf 16 exec.c struct elfhdr elf; elf 33 exec.c if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf)) elf 35 exec.c if(elf.magic != ELF_MAGIC) elf 43 exec.c for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ elf 100 exec.c curproc->tf->eip = elf.entry; // main