7 lines
218 B
C
7 lines
218 B
C
#include "elf.h"
|
|
|
|
int elf32_validate(Elf32_Ehdr *hdr) {
|
|
return hdr->e_ident[EI_MAG0] == ELFMAG0 && hdr->e_ident[EI_MAG1] == ELFMAG1 &&
|
|
hdr->e_ident[EI_MAG2] == ELFMAG2 && hdr->e_ident[EI_MAG3] == ELFMAG3;
|
|
}
|