char *errs = 0;
loadfile(fname)	register char *fname;{	union {		Elf32_Ehdr eh32;		Elf64_Ehdr eh64;	} eh;	int fd, i;	Elf32_Addr entry;	char *errs = 0;	if ((fd = oopen(fname, 0)) < 0) {		printf("can't open file %s\n", fname);		return NULL;	}	/* read the ELF header and check that it IS an ELF header */	if (oread(fd, (char *)&eh, sizeof(eh)) != sizeof(eh)) {		printf("error: ELF header read error\n");		return NULL;	}	if (!IS_ELF(eh.eh32)) {		printf("not an elf file\n");		return NULL;	}	/* Determine CLASS */	if (eh.eh32.e_ident[EI_CLASS] == ELFCLASS32)		entry = loadfile32(fd, (void *)&eh);	else if (eh.eh32.e_ident[EI_CLASS] == ELFCLASS64)		entry = loadfile64(fd, (void *)&eh);	else {		printf("unknown ELF class\n");		return NULL;	}	return entry;}