* commit '1ad08626a143dc684e92f56754c7176cc4914ce8': bionic: add machine type check
This commit is contained in:
commit
0e0bd58631
1 changed files with 5 additions and 1 deletions
|
@ -730,7 +730,11 @@ verify_elf_object(void *base, const char *name)
|
|||
if (hdr->e_ident[EI_MAG3] != ELFMAG3) return -1;
|
||||
|
||||
/* TODO: Should we verify anything else in the header? */
|
||||
|
||||
#ifdef ANDROID_ARM_LINKER
|
||||
if (hdr->e_machine != EM_ARM) return -1;
|
||||
#elif defined(ANDROID_X86_LINKER)
|
||||
if (hdr->e_machine != EM_386) return -1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue