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] == ELFCLASS64 &&
12 ehdr->e_ident[EI_DATA] == ELFDATA2LSB &&
13 ehdr->e_machine == EM_X86_64;