Safe and static parsing for ELF format