am 1ad08626: am 897815a1: bionic: add machine type check

* commit '1ad08626a143dc684e92f56754c7176cc4914ce8':
  bionic: add machine type check
This commit is contained in:
Zhenghua Wang 2011-11-30 10:50:57 -08:00 committed by Android Git Automerger
commit 0e0bd58631

View file

@ -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;
}