binfmt_elf: Hoist ELF program header loading to a function