am 897815a1: bionic: add machine type check
* commit '897815a1feff230be3ea42655a77dcbb9a8dcca9': bionic: add machine type check
This commit is contained in:
commit
1ad08626a1
@ -707,7 +707,11 @@ verify_elf_object(void *base, const char *name)
|
|||||||
if (hdr->e_ident[EI_MAG3] != ELFMAG3) return -1;
|
if (hdr->e_ident[EI_MAG3] != ELFMAG3) return -1;
|
||||||
|
|
||||||
/* TODO: Should we verify anything else in the header? */
|
/* 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user