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 30 exec.c if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf)) elf 32 exec.c if(elf.magic != ELF_MAGIC) elf 40 exec.c for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ elf 93 exec.c proc->tf->eip = elf.entry; // main