Support grub-emu on x32 (ILP32 but with x86-64 instruction set)
authorColin Watson <cjwatson@ubuntu.com>
Sun, 7 Sep 2014 22:04:35 +0000 (23:04 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Sun, 7 Sep 2014 22:04:50 +0000 (23:04 +0100)
commit2a5a532c0047d4eff90175936b220b638cce1013
treefa2054cc7038fa2fa270efeb0f6d6c97b7bfbe0e
parent4d94b2db58e5d6e3d6e451ab294cd9def33f7aef
Support grub-emu on x32 (ILP32 but with x86-64 instruction set)

* configure.ac: Remove -m64 from checks for -mcmodel=large and
-mno-red-zone.  These are always either unnecessary (x86_64-emu) or
already in TARGET_CFLAGS at this point, and they produce incorrect
results when building for x32.
* grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Cast
pointers to Elf64_Xword via grub_addr_t, in order to work on x32.
* include/grub/x86_64/types.h (GRUB_TARGET_SIZEOF_VOID_P,
GRUB_TARGET_SIZEOF_LONG): Define to 4 on x32.
ChangeLog
configure.ac
grub-core/kern/x86_64/dl.c
include/grub/x86_64/types.h