1 #include <lunaix/exebi/elf.h>
6 elf_check_arch(const struct elf* elf)
8 const struct elf_ehdr* ehdr = &elf->eheader;
10 return *(u32_t*)(ehdr->e_ident) == ELFMAGIC_LE &&
11 ehdr->e_ident[EI_CLASS] == ELFCLASS32 &&
12 ehdr->e_ident[EI_DATA] == ELFDATA2LSB && ehdr->e_machine == EM_386;