/* * */ #undef BOOTSTRAP #include "config.h" #include "libopenbios/bindings.h" #include "libopenbios/elf_load.h" #include "arch/common/nvram.h" #include "libc/diskio.h" void boot(void); void *load_elf(char *spec); void *load_elf(char *spec) { #if 0 int fd; void *entry=NULL; int i, lszz_offs, elf_offs; char buf[128]; // , *addr; Elf_ehdr ehdr; Elf_phdr *phdr; size_t s; if( (fd=open_io(spec)) == -1 ) return NULL; if( (elf_offs=find_elf(fd)) < 0 ) { printk("----> %s is not an ELF image\n", buf ); return NULL; } if( !(phdr=elf_readhdrs(fd, 0, &ehdr)) ) { printk("elf32_readhdrs failed\n"); return NULL; } (unsigned long long *)entry = ehdr.e_entry; lszz_offs = elf_offs; for( i=0; i