Commit Graph

4 Commits

Author SHA1 Message Date
Tomohiro B Berry
0d73a3c100 Add bi-endian support to ELF parser
This patch adds bi-endian support for both 32-bit and 64-bit elf files.

It compares the native endianness to the endianness of the elf file, and
swaps the header bytes if necessary.  This will allow, for example,
32-bit Big Endian grub to load a 64-bit Little Endian kernel.

Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-01/msg00039.html

Patch-Name: elf_bi_endian.patch
2014-01-15 16:03:07 +00:00
Vladimir Serbinenko
48ba5c0c86 * grub-core/kern/elfXX.c: Use grub_addr_t rather than long when
appropriate.
2013-12-15 14:33:22 +01:00
Vladimir 'phcoder' Serbinenko
aeace7f71c * grub-core/kern/elfXX.c (grub_elfXX_load): Handle
GRUB_ELF_LOAD_FLAGS_30BITS and GRUB_ELF_LOAD_FLAGS_62BITS.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32),
	(grub_linux_load64): Mask out 2 high bits.
2013-04-19 15:05:11 +02:00
Vladimir 'phcoder' Serbinenko
73bf57e2c8 Make elfload not use hooks. Opt for flags and iterators instead. 2013-03-02 16:45:57 +01:00