Check e_ident of elf header

I tested this behavior on my PSP.

If the first 4 bytes aren't correct, it quits with an SCE_KERNEL_ERROR_UNSUPPORTED_PRX_TYPE error.
If EI_CLASS is 0, the system freezes. If it has values other than 0 or 1, it quits with an SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED error.
If EI_DATA isn't 1, it also quits with an SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED error.
The value of EI_VERSION doesn't seem to make any difference.