From: Vladimir Serbinenko Date: Mon, 11 Nov 2013 22:02:51 +0000 (+0100) Subject: * grub-core/lib/i386/relocator_common.S [__APPLE__ && __x86_64__]: Use X-Git-Tag: grub-2.02-beta1~398 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8445b0115f365903a8c8f005dd53cb3d969b87ad;p=thirdparty%2Fgrub.git * grub-core/lib/i386/relocator_common.S [__APPLE__ && __x86_64__]: Use rip-relative addressing in prologue. --- diff --git a/ChangeLog b/ChangeLog index f387a60f3..7949e3352 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-11 Vladimir Serbinenko + + * grub-core/lib/i386/relocator_common.S [__APPLE__ && __x86_64__]: Use + rip-relative addressing in prologue. + 2013-11-11 Vladimir Serbinenko * include/grub/misc.h [__APPLE__]: Do not add regparm(0) on x86_64. diff --git a/grub-core/lib/i386/relocator_common.S b/grub-core/lib/i386/relocator_common.S index b9d99e10e..03f427a03 100644 --- a/grub-core/lib/i386/relocator_common.S +++ b/grub-core/lib/i386/relocator_common.S @@ -42,7 +42,9 @@ LOCAL(base): /* %rax contains now our new 'base'. */ mov RAX, RSI -#ifdef __APPLE__ +#if defined (__APPLE__) && defined (__x86_64__) + leaq LOCAL(cont0) (%rip), RAX +#elif defined (__APPLE__) LOCAL(cont0_offset) = LOCAL(cont0) - LOCAL(base) add $LOCAL(cont0_offset), RAX #else