arm: boot: Support big-endian elfs
Support ARM big-endian ELF files in system-mode emulation. When loading
an elf, determine the endianness mode expected by the elf, and set the
relevant CPU state accordingly.
With this, big-endian modes are now fully supported via system-mode LE,
so there is no need to restrict the elf loading to the TARGET
endianness so the ifdeffery on TARGET_WORDS_BIGENDIAN goes away.
---CHANGELOG---
Changed since v1:
Factor out elf manipulation logic into static helper (PMM review)
---END---
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>